flow icon indicating copy to clipboard operation
flow copied to clipboard

Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener]

Open lazizbektulanov opened this issue 1 year ago • 17 comments

Description of the bug

I have migrated my vaadin 23 application to 24. And got this ERROR on startup Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener]. java.lang.NoClassDefFoundError: com/vaadin/flow/server/PageConfigurator

Expected behavior

I have no idea which class is using it.

Minimal reproducible example

Migrate Vaadin 23 to Vaadin 24. Vaadin version: 23 -> 24 Spring Boot version: 2.7 -> 3.0

Versions

  • Vaadin / Flow version: 24.3.1
  • Java version: 17
  • Spring boot version: 3.0.0

lazizbektulanov avatar Dec 23 '23 06:12 lazizbektulanov

Sounds like a version mismatch and you still have some old dependencies in your tree.

knoobie avatar Dec 23 '23 08:12 knoobie

Sounds like a version mismatch and you still have some old dependencies in your tree.

Do you mean version of third party libraries too?

lazizbektulanov avatar Dec 23 '23 10:12 lazizbektulanov

Anything that could contain Vaadin flow dependencies

knoobie avatar Dec 23 '23 10:12 knoobie

Anything that could contain Vaadin flow dependencies

Yeah i have commented one library (that i was not using) and my application has started. But i got another errors frontend cannot build. Because earlier i deleted some generated files node_modules,package.json, package-lock.json. How can i clean and rebuild everything?

lazizbektulanov avatar Dec 23 '23 10:12 lazizbektulanov

Vaadin recreates those files if they are missing. You can try to execute vaadin:dance with Maven.

There is also https://vaadin.com/docs/latest/upgrading to follow

knoobie avatar Dec 23 '23 11:12 knoobie

Vaadin recreates those files if they are missing. You can try to execute vaadin:dance with Maven.

There is also https://vaadin.com/docs/latest/upgrading to follow

Thank you very much, my application is working, but i have another questions.

  1. Now application is taking too much time to launch, what might be a reason? Before in vaadin 23, there was no such problem.
  2. I dont see a message like it was shown before in Vaadin 23.

------------------ Starting Frontend compilation. ------------------ <

But i still can open a webpages and i see that it is starting in Development mode, should i need to make some configurations?

lazizbektulanov avatar Dec 23 '23 12:12 lazizbektulanov

You should read the patch notes of the releases in between your old and the new version. A lot of things changed / improved.

Only the first start should be slow while npm is executed to load dependencies.

knoobie avatar Dec 23 '23 12:12 knoobie

You should read the patch notes of the releases in between your old and the new version. A lot of things changed / improved.

Only the first start should be slow while npm is executed to load dependencies.

i have started several times already, it takes 35 seconds to launch all the time compared to 11 seconds in Vaadin 23.

But what about a message, why it is not shown in logs?

------------------ Starting Frontend compilation. ------------------ <

lazizbektulanov avatar Dec 23 '23 13:12 lazizbektulanov

@lazizbektulanov Could you please post the full logs? If you start the application with maven from the command line, please add these arguments to the command: -Dorg.slf4j.simpleLogger.showDateTime -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS

mcollovati avatar Dec 27 '23 09:12 mcollovati

@lazizbektulanov Could you please post the full logs? If you start the application with maven from the command line, please add these arguments to the command: -Dorg.slf4j.simpleLogger.showDateTime -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS

2023-12-31T15:17:35.653+05:00 INFO 11612 --- [ restartedMain] c.e.leaflettest.LeafletTestApplication : Starting LeafletTestApplication using Java 17.0.3 with PID 11612 (C:\Users\User\Desktop\leaflet example (2)\leaflet-test\leaflet-test\target\classes started by User in C:\Users\User\Desktop\leaflet example (2)\leaflet-test\leaflet-test) 2023-12-31T15:17:35.658+05:00 INFO 11612 --- [ restartedMain] c.e.leaflettest.LeafletTestApplication : The following 1 profile is active: "dev" 2023-12-31T15:17:35.731+05:00 INFO 11612 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2023-12-31T15:17:35.731+05:00 INFO 11612 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' 2023-12-31T15:17:36.699+05:00 INFO 11612 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-12-31T15:17:36.875+05:00 INFO 11612 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 167 ms. Found 18 JPA repository interfaces. 2023-12-31T15:17:37.852+05:00 INFO 11612 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2023-12-31T15:17:37.864+05:00 INFO 11612 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2023-12-31T15:17:37.865+05:00 INFO 11612 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.1] 2023-12-31T15:17:37.977+05:00 INFO 11612 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2023-12-31T15:17:37.977+05:00 INFO 11612 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2245 ms 2023-12-31T15:17:37.990+05:00 WARN 11612 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.SpringBootAutoConfiguration 2023-12-31T15:17:38.914+05:00 INFO 11612 --- [ restartedMain] c.v.f.s.VaadinServletContextInitializer : Search for subclasses and classes with annotations took 578 ms 2023-12-31T15:17:39.354+05:00 INFO 11612 --- [ restartedMain] c.v.b.d.startup.DevModeStartupListener : Starting dev-mode updaters in C:\Users\User\Desktop\leaflet example (2)\leaflet-test\leaflet-test folder. 2023-12-31T15:17:39.407+05:00 INFO 11612 --- [ restartedMain] c.v.f.s.f.s.FullDependenciesScanner : Visited 125 classes. Took 31 ms. 2023-12-31T15:17:39.410+05:00 INFO 11612 --- [ restartedMain] c.v.f.s.frontend.BundleValidationUtil : Checking if a development mode bundle build is needed 2023-12-31T15:17:40.229+05:00 INFO 11612 --- [ restartedMain] c.v.f.s.frontend.BundleValidationUtil : A development mode bundle build is not needed 2023-12-31T15:17:40.269+05:00 INFO 11612 --- [onPool-worker-1] c.v.f.s.frontend.TaskCopyFrontendFiles : Copying frontend resources from jar files ... 2023-12-31T15:17:40.481+05:00 INFO 11612 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2023-12-31T15:17:40.529+05:00 INFO 11612 --- [onPool-worker-1] c.v.f.s.frontend.TaskCopyFrontendFiles : Visited 30 resources. Took 260 ms. 2023-12-31T15:17:40.544+05:00 INFO 11612 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.5.Final 2023-12-31T15:17:40.800+05:00 WARN 11612 --- [ restartedMain] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead 2023-12-31T15:17:40.938+05:00 INFO 11612 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-12-31T15:17:41.210+05:00 INFO 11612 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@33fbe64c 2023-12-31T15:17:41.211+05:00 INFO 11612 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2023-12-31T15:17:41.249+05:00 INFO 11612 --- [ restartedMain] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect 2023-12-31T15:17:42.894+05:00 INFO 11612 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2023-12-31T15:17:42.901+05:00 INFO 11612 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2023-12-31T15:17:43.195+05:00 WARN 11612 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.SpringSecurityAutoConfiguration 2023-12-31T15:17:43.301+05:00 WARN 11612 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2023-12-31T15:17:43.393+05:00 WARN 11612 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.security.VaadinWebSecurity 2023-12-31T15:17:43.478+05:00 INFO 11612 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@3d787d0, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@67ae792c, org.springframework.security.web.context.SecurityContextHolderFilter@41b2db, org.springframework.security.web.header.HeaderWriterFilter@21fb0b6b, org.springframework.security.web.csrf.CsrfFilter@37646a30, org.springframework.security.web.authentication.logout.LogoutFilter@75916deb, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@201961fc, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@586b9e6, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@250340c9, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@880ab30, org.springframework.security.web.access.ExceptionTranslationFilter@757d3d34, org.springframework.security.web.access.intercept.AuthorizationFilter@3ababf66] 2023-12-31T15:17:43.505+05:00 WARN 11612 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.VaadinServletConfiguration 2023-12-31T15:17:44.271+05:00 INFO 11612 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2023-12-31T15:17:44.299+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /* 2023-12-31T15:17:44.300+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler 2023-12-31T15:17:44.329+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation 2023-12-31T15:17:44.337+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.util.ForkJoinPool : Using ForkJoinPool java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power. 2023-12-31T15:17:44.347+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 2023-12-31T15:17:44.351+05:00 INFO 11612 --- [ restartedMain] o.a.container.JSR356AsyncSupport : JSR 356 Mapping path /VAADIN/push 2023-12-31T15:17:44.359+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installing Default AtmosphereInterceptors 2023-12-31T15:17:44.359+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support 2023-12-31T15:17:44.360+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor 2023-12-31T15:17:44.360+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support 2023-12-31T15:17:44.361+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support 2023-12-31T15:17:44.361+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support 2023-12-31T15:17:44.362+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support 2023-12-31T15:17:44.362+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support 2023-12-31T15:17:44.363+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol 2023-12-31T15:17:44.364+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor 2023-12-31T15:17:44.364+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection 2023-12-31T15:17:44.364+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor 2023-12-31T15:17:44.364+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them. 2023-12-31T15:17:44.364+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] o.a.interceptor.HeartbeatInterceptor : HeartbeatInterceptor configured with padding value 'X', client frequency 0 seconds and server frequency 60 seconds 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Heartbeat Interceptor Support with priority AFTER_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 2023-12-31T15:17:44.365+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Broadcaster Shared List Resources: false 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Broadcaster Polling Wait Time 100 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Shared ExecutorService supported: true 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Async I/O Thread Pool Size: 200 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory 2023-12-31T15:17:44.366+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor 2023-12-31T15:17:44.368+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Invoke AtmosphereInterceptor on WebSocket message true 2023-12-31T15:17:44.369+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : HttpSession supported: true 2023-12-31T15:17:44.369+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation 2023-12-31T15:17:44.369+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: Apache Tomcat/10.1.1 using jakarta.servlet/3.0 and jsr356/WebSocket API 2023-12-31T15:17:44.369+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere Framework 3.0.3.slf4jvaadin2 started. 2023-12-31T15:17:44.372+05:00 INFO 11612 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT 2023-12-31T15:17:44.405+05:00 INFO 11612 --- [ restartedMain] c.v.f.s.DefaultDeploymentConfiguration : Vaadin is running in DEVELOPMENT mode - do not use for production deployments. 2023-12-31T15:17:44.435+05:00 WARN 11612 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.collaborationengine.CollaborationEngineConfiguration 2023-12-31T15:17:44.442+05:00 INFO 11612 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2023-12-31T15:17:44.451+05:00 INFO 11612 --- [ restartedMain] c.e.leaflettest.LeafletTestApplication : Started LeafletTestApplication in 9.351 seconds (process running for 10.549) 2023-12-31T15:17:47.186+05:00 INFO 11612 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2023-12-31T15:17:47.187+05:00 INFO 11612 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2023-12-31T15:17:47.189+05:00 INFO 11612 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms <

btw i'm also getting this warning:

2023-12-31T15:49:40.572+05:00 WARN 456 --- [nio-8080-exec-1] c.v.b.devserver.DebugWindowConnection : Connection denied because of a missing or invalid token. The host is probably not on the allow list<

lazizbektulanov avatar Dec 31 '23 10:12 lazizbektulanov

@lazizbektulanov your log snippet shows that the app is starting within 12 secs and also it says:

Checking if a development mode bundle build is needed
A development mode bundle build is not needed

which means that your application doesn't need a frontend compilation and it may use the pre-compiled bundle (which should be faster, see https://vaadin.com/docs/latest/configuration/development-mode#precompiled-bundle). That's why you don't see the Starting Frontend compilation message, as it only shown when frontend installation, compilation and dev server startup happens.

mshabarov avatar Jan 02 '24 12:01 mshabarov

btw i'm also getting this warning:

Do you use localhost to open your app ? Vaadin blocks debug window connections for non-localhost connections, so that if you share the application with anyone else, the connection is refused by default.

If so, please set up the config parameter vaadin.devmode.hostsAllowed as described here https://github.com/vaadin/flow/issues/18351#issuecomment-1870018809.

This unfortunately misses a documentation currently.

mshabarov avatar Jan 02 '24 12:01 mshabarov

@lazizbektulanov your log snippet shows that the app is starting within 12 secs

Startup time was 36 secs, it is speeded up after adding this to my application.properties:

vaadin.whitelisted-packages=com.flowingcode

Is it ok with adding this config?

lazizbektulanov avatar Jan 03 '24 05:01 lazizbektulanov

This parameter allows you to limit the class scanning made by Vaadin to a given packages, improving the application startup and reload time, and it's fine to use this parameter. The segments in the package name should be separated by slash /, not by dot ., see the docs.

mshabarov avatar Jan 03 '24 11:01 mshabarov

So original issue with thrown exception is solved, but there is a startup time question:

Now application is taking too much time to launch, what might be a reason?

Could you please provide a server log before adding vaadin.whitelisted-packages=com.flowingcode with the DEBUG level enabled, so we can analyse what takes a bigger time now for V24 comparing to what you had for V23?

mshabarov avatar Jan 09 '24 12:01 mshabarov

Of course

2024-01-10T09:38:26.619+05:00 INFO 15212 --- [ restartedMain] c.v.f.s.f.s.FullDependenciesScanner : Visited 136 classes. Took 24 ms. 2024-01-10T09:38:26.620+05:00 INFO 15212 --- [ restartedMain] c.v.f.s.frontend.BundleValidationUtil : Checking if a development mode bundle build is needed 2024-01-10T09:38:27.038+05:00 INFO 15212 --- [ restartedMain] c.v.f.s.frontend.BundleValidationUtil : A development mode bundle build is not needed 2024-01-10T09:38:27.076+05:00 INFO 15212 --- [onPool-worker-2] c.v.f.s.frontend.TaskCopyFrontendFiles : Copying frontend resources from jar files ... 2024-01-10T09:38:27.414+05:00 INFO 15212 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2024-01-10T09:38:27.495+05:00 INFO 15212 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.5.Final 2024-01-10T09:38:27.564+05:00 INFO 15212 --- [onPool-worker-2] c.v.f.s.frontend.TaskCopyFrontendFiles : Visited 30 resources. Took 487 ms. 2024-01-10T09:38:27.703+05:00 WARN 15212 --- [ restartedMain] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead 2024-01-10T09:38:27.846+05:00 INFO 15212 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2024-01-10T09:38:27.998+05:00 INFO 15212 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@37406e65 2024-01-10T09:38:28.000+05:00 INFO 15212 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2024-01-10T09:38:28.038+05:00 INFO 15212 --- [ restartedMain] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect 2024-01-10T09:38:29.424+05:00 INFO 15212 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2024-01-10T09:38:29.433+05:00 INFO 15212 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2024-01-10T09:38:29.775+05:00 WARN 15212 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.SpringSecurityAutoConfiguration 2024-01-10T09:38:29.939+05:00 WARN 15212 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2024-01-10T09:38:30.041+05:00 WARN 15212 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.security.VaadinWebSecurity 2024-01-10T09:38:30.088+05:00 INFO 15212 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@fe45323, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3315d3f6, org.springframework.security.web.context.SecurityContextHolderFilter@7a64d6aa, org.springframework.security.web.header.HeaderWriterFilter@10dddd76, org.springframework.security.web.csrf.CsrfFilter@2a54a899, org.springframework.security.web.authentication.logout.LogoutFilter@5c3621e9, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@74d47705, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@182ec0cc, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6c044183, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6e7b5ab8, org.springframework.security.web.access.ExceptionTranslationFilter@5e85363f, org.springframework.security.web.access.intercept.AuthorizationFilter@44d32c00] 2024-01-10T09:38:30.117+05:00 WARN 15212 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.flow.spring.VaadinServletConfiguration 2024-01-10T09:38:30.942+05:00 INFO 15212 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2024-01-10T09:38:30.985+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /* 2024-01-10T09:38:30.985+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler 2024-01-10T09:38:31.037+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation 2024-01-10T09:38:31.061+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.util.ForkJoinPool : Using ForkJoinPool java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power. 2024-01-10T09:38:31.069+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 2024-01-10T09:38:31.076+05:00 INFO 15212 --- [ restartedMain] o.a.container.JSR356AsyncSupport : JSR 356 Mapping path /VAADIN/push 2024-01-10T09:38:31.086+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installing Default AtmosphereInterceptors 2024-01-10T09:38:31.087+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support 2024-01-10T09:38:31.088+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor 2024-01-10T09:38:31.088+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support 2024-01-10T09:38:31.089+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support 2024-01-10T09:38:31.089+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support 2024-01-10T09:38:31.089+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support 2024-01-10T09:38:31.090+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support 2024-01-10T09:38:31.091+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol 2024-01-10T09:38:31.091+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor 2024-01-10T09:38:31.091+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection 2024-01-10T09:38:31.091+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor 2024-01-10T09:38:31.091+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them. 2024-01-10T09:38:31.092+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 2024-01-10T09:38:31.092+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 2024-01-10T09:38:31.092+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 2024-01-10T09:38:31.092+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 2024-01-10T09:38:31.092+05:00 INFO 15212 --- [ restartedMain] o.a.interceptor.HeartbeatInterceptor : HeartbeatInterceptor configured with padding value 'X', client frequency 0 seconds and server frequency 60 seconds 2024-01-10T09:38:31.092+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Heartbeat Interceptor Support with priority AFTER_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Broadcaster Shared List Resources: false 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Broadcaster Polling Wait Time 100 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Shared ExecutorService supported: true 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Async I/O Thread Pool Size: 200 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory 2024-01-10T09:38:31.093+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor 2024-01-10T09:38:31.095+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Invoke AtmosphereInterceptor on WebSocket message true 2024-01-10T09:38:31.095+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : HttpSession supported: true 2024-01-10T09:38:31.096+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation 2024-01-10T09:38:31.096+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: Apache Tomcat/10.1.1 using jakarta.servlet/3.0 and jsr356/WebSocket API 2024-01-10T09:38:31.096+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Atmosphere Framework 3.0.3.slf4jvaadin2 started. 2024-01-10T09:38:31.099+05:00 INFO 15212 --- [ restartedMain] org.atmosphere.cpr.AtmosphereFramework : Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT 2024-01-10T09:38:31.128+05:00 INFO 15212 --- [ restartedMain] c.v.f.s.DefaultDeploymentConfiguration : Vaadin is running in DEVELOPMENT mode - do not use for production deployments. 2024-01-10T09:38:31.163+05:00 WARN 15212 --- [ restartedMain] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.vaadin.collaborationengine.CollaborationEngineConfiguration 2024-01-10T09:38:31.176+05:00 INFO 15212 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2024-01-10T09:38:31.188+05:00 INFO 15212 --- [ restartedMain] c.e.leaflettest.LeafletTestApplication : Started LeafletTestApplication in 39.431 seconds (process running for 41.015)

lazizbektulanov avatar Jan 10 '24 04:01 lazizbektulanov

This might be wrong, but my very random though is that previously with V23 you had 11 seconds for spring app to start, but there was a background process for npm installation, frontend compilation and Vite dev server startup time that takes much longer than 11 sec, so in practice the total time was minutes before you can access the app in browser. Now with V24 you can avoid frontend compilation, so the total time is 35 secs, but this is less than with "hotdeploy" mode that was a default in V23.

mshabarov avatar Jan 30 '24 11:01 mshabarov