Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that Java code changes get picked after the class compilation #7068

Closed
mehdi-vaadin opened this issue Dec 2, 2019 · 3 comments
Closed

Comments

@mehdi-vaadin
Copy link
Contributor

mehdi-vaadin commented Dec 2, 2019

When building apps, I want my Java code changes to automatically get picked up after compilation and I can see the changes in the browser.

Class compilation: it's something that required for (any) tool to reload.
In fact: Java code changes should be picked up once the tool is able to pick those changes (it should not require explicit application restart).

What should be checked:

  • make a change in Java code so that no any frontend resources and route targets are affected (only add some additional logic). The resulting application should be updated correctly based on the changes (without a full reload/rebuild).
  • add a (Vaadin) component which is not used yet in the existing code: check that it's picked correctly. This should work because in the dev mode every component form the classpath is included in the bundle.

They should be checked with

  • Spring Boot apps
  • Plain servlet apps
  • CDI apps

Out of scope of this issue:

  • classpath modification ( adding a new dependency to the classpath).
  • any route targets modification
  • any frontend resource modification.

The scenario should be checked for any "hotswap" tool: jetty (via scanning interval), Spring boot dev tools, hotswap agent (is it a correct name?), JRebel.

@pleku
Copy link
Contributor

pleku commented Dec 9, 2019

The test permutations:

  • Spring apps -> should test reload with injecting a new component
    • spring dev tools
    • JRebel
    • Hotswap agent
  • Plain Servlet
    • Jetty Maven Plugin (scanInterval)
    • JRebel
    • Hotswap agent
  • CDI -> should test reload with injecting a new bean
    • TomEE Maven Plugin (does it have any live reload?)
    • Wildfly Maven Plugin

@pleku pleku moved this from Product backlog to Ready To Go in OLD Vaadin Flow ongoing work (Vaadin 10+) Dec 9, 2019
@denis-anisimov denis-anisimov moved this from Ready To Go to In progress in OLD Vaadin Flow ongoing work (Vaadin 10+) Dec 16, 2019
@denis-anisimov denis-anisimov self-assigned this Dec 16, 2019
@joheriks joheriks self-assigned this Dec 16, 2019
@joheriks
Copy link
Contributor

joheriks commented Dec 16, 2019

CDI investigation

Using tomee-maven-plugin

Hot deployment for Vaadin CDI starter using tomee-maven-plugin can be enabled by configuring the plugin in pom.xml as follows:

  <plugin>
    <groupId>org.apache.tomee.maven</groupId>
    <artifactId>tomee-maven-plugin</artifactId>
    <version>7.1.1</version>
    <configuration>
      <tomeeClassifier>webprofile</tomeeClassifier>
      <context>ROOT</context>
      <synchronization>
        <extensions>
          <extension>.class</extension>
        </extensions>
      </synchronization>
      <reloadOnUpdate>true</reloadOnUpdate>
      <systemVariables>
        <openejb.system.apps>true</openejb.system.apps>
        <tomee.serialization.class.blacklist>-</tomee.serialization.class.blacklist>
      </systemVariables>
    </configuration>
  </plugin>

Any modification to the source causing the generation of new class files are picked up and the application automatically redeployed (including bean discovery). However, some unsightly WARNINGs related to the webpack dev server + watchdog not being terminated and a SEVERE session deserialization failure are shown in the console:

Click to open redeployment log dump
====================================================================
Vaadin is running in DEBUG MODE.
In order to run your application in production mode and disable debug features, you should enable it by setting the servlet init parameter productionMode to true.
See https://vaadin.com/docs/v14/flow/production/tutorial-production-mode-basic.html for more information about the production mode.
====================================================================
[http-nio-8080-exec-2] INFO com.vaadin.cdi.CdiInstantiator - Can't find any @VaadinServiceScoped bean implementing 'I18NProvider'. Cannot use CDI beans for I18N, falling back to the default behavior.
[INFO] [Updating] /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/classes/com/vaadin/starter/skeleton/cdi/MainView.class to /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT/WEB-INF/classes/com/vaadin/starter/skeleton/cdi/MainView.class
[INFO] [Updating] /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/classes/com/vaadin/starter/skeleton/cdi/BrandNewBean.class to /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT/WEB-INF/classes/com/vaadin/starter/skeleton/cdi/BrandNewBean.class
[INFO] Reloading /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT
Dec 16, 2019 2:17:43 PM org.apache.openejb.client.EventLogger log
INFO: RemoteInitialContextCreated{providerUri=http://localhost:8080/tomee/ejb}
16-Dec-2019 14:17:43.281 INFO [http-nio-8080-exec-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Reloading Context with name [] has started
16-Dec-2019 14:17:43.326 INFO [http-nio-8080-exec-1] org.apache.openejb.assembler.classic.Assembler.destroyApplication Undeploying app: /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT
16-Dec-2019 14:17:43.460 WARNING [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Thread-33] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.net.PlainSocketImpl.socketAccept(Native Method)
 java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
 java.net.ServerSocket.implAccept(ServerSocket.java:545)
 java.net.ServerSocket.accept(ServerSocket.java:513)
 com.vaadin.flow.server.DevServerWatchDog$WatchDogServer.run(DevServerWatchDog.java:58)
 java.lang.Thread.run(Thread.java:748)
16-Dec-2019 14:17:43.462 WARNING [http-nio-8080-exec-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [webpack] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.io.FileInputStream.readBytes(Native Method)
 java.io.FileInputStream.read(FileInputStream.java:255)
 java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
 java.io.BufferedInputStream.read(BufferedInputStream.java:345)
 sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
 sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
 sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
 java.io.InputStreamReader.read(InputStreamReader.java:184)
 java.io.BufferedReader.fill(BufferedReader.java:161)
 java.io.BufferedReader.readLine(BufferedReader.java:324)
 java.io.BufferedReader.readLine(BufferedReader.java:389)
 com.vaadin.flow.server.DevModeHandler.readLinesLoop(DevModeHandler.java:457)
 com.vaadin.flow.server.DevModeHandler.lambda$logStream$1(DevModeHandler.java:435)
 com.vaadin.flow.server.DevModeHandler$$Lambda$116/1442345081.run(Unknown Source)
 java.lang.Thread.run(Thread.java:748)
16-Dec-2019 14:17:43.918 INFO [http-nio-8080-exec-1] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT
16-Dec-2019 14:17:44.014 INFO [http-nio-8080-exec-1] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "/Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT" loaded.
16-Dec-2019 14:17:44.014 INFO [http-nio-8080-exec-1] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT
16-Dec-2019 14:17:44.020 INFO [http-nio-8080-exec-1] org.apache.openejb.cdi.CdiBuilder.initSingleton Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@44a664f2
16-Dec-2019 14:17:44.024 INFO [http-nio-8080-exec-1] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container is starting...
16-Dec-2019 14:17:44.297 INFO [http-nio-8080-exec-1] org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for file:/Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT/WEB-INF/lib/atmosphere-runtime-2.4.30.slf4jvaadin1.jar looking all classes to find CDI beans, maybe think to add a beans.xml if not there or add the jar to exclusions.list
16-Dec-2019 14:17:44.317 INFO [http-nio-8080-exec-1] org.apache.deltaspike.core.util.ProjectStageProducer.initProjectStage Computed the following DeltaSpike ProjectStage: Production
[http-nio-8080-exec-1] INFO com.vaadin.cdi.VaadinExtension - VaadinServiceScopedContext registered for Vaadin CDI
[http-nio-8080-exec-1] INFO com.vaadin.cdi.VaadinExtension - VaadinSessionScopedContext registered for Vaadin CDI
[http-nio-8080-exec-1] INFO com.vaadin.cdi.VaadinExtension - UIScopedContext registered for Vaadin CDI
[http-nio-8080-exec-1] INFO com.vaadin.cdi.VaadinExtension - RouteScopedContext registered for Vaadin CDI
16-Dec-2019 14:17:44.713 INFO [http-nio-8080-exec-1] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 689 ms.
16-Dec-2019 14:17:44.716 INFO [http-nio-8080-exec-1] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=/Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/apache-tomee/webapps/ROOT)
[http-nio-8080-exec-1] INFO com.vaadin.cdi.CdiServletDeployer - Automatically deploying CDI Vaadin servlet to /*
[http-nio-8080-exec-1] INFO com.vaadin.flow.server.startup.DevModeInitializer - Starting dev-mode updaters in /Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi folder.
[http-nio-8080-exec-1] INFO dev-updater - Visited 72 classes. Took 16 ms.
[http-nio-8080-exec-1] INFO dev-updater - Skipping `npm install`.
[http-nio-8080-exec-1] INFO dev-updater - Copying frontend resources from jar files ...
[http-nio-8080-exec-1] INFO dev-updater - Visited 12 resources. Took 54 ms.
[http-nio-8080-exec-1] INFO dev-updater - No js modules to update '/Users/joheriks/vaadin/dev/skeleton-starter-flow-cdi/target/frontend/generated-flow-imports.js' file
[http-nio-8080-exec-1] INFO dev-webpack - Reusing webpack-dev-server running at http://localhost:59397
16-Dec-2019 14:17:45.181 INFO [http-nio-8080-exec-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[http-nio-8080-exec-1] INFO com.vaadin.flow.server.startup.ServletDeployer - Skipping automatic servlet registration because there is already a Vaadin servlet with the name com.vaadin.cdi.CdiServletDeployer
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /*
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
[http-nio-8080-exec-1] INFO org.atmosphere.util.ForkJoinPool - Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
[http-nio-8080-exec-1] INFO org.atmosphere.container.JSR356AsyncSupport - JSR 356 Mapping path 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptors
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Dropping Interceptor org.atmosphere.interceptor.HeartbeatInterceptor
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Shared List Resources: false
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Async I/O Thread Pool Size: 200
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Invoke AtmosphereInterceptor on WebSocket message true
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - HttpSession supported: true
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: Apache Tomcat (TomEE)/8.5.41 (7.1.1) using javax.servlet/3.0 and jsr356/WebSocket API
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 2.4.30.slf4jvaadin1 started.
[http-nio-8080-exec-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
16-Dec-2019 14:17:45.333 SEVERE [http-nio-8080-exec-1] org.apache.catalina.session.StandardManager.startInternal Exception loading sessions from persistent storage
	java.io.StreamCorruptedException: invalid type code: 00
		at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1601)
		at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
		at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:561)
		at java.lang.Throwable.readObject(Throwable.java:914)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1170)
		at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2178)
		at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
		at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
		at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
		at org.apache.catalina.session.StandardSession.doReadObject(StandardSession.java:1589)
		at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1077)
		at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:217)
		at org.apache.catalina.session.StandardManager.load(StandardManager.java:161)
		at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:351)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5253)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
		at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3828)
		at org.apache.tomee.catalina.deployment.TomcatWebappDeployer.reload(TomcatWebappDeployer.java:95)
		at org.apache.openejb.assembler.DeployerEjb.reload(DeployerEjb.java:476)
		at org.apache.openejb.assembler.DeployerEjb.reload(DeployerEjb.java:464)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
		at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
		at org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
		at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
		at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:191)
		at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:102)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
		at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
		at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
		at org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:272)
		at org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:221)
		at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:371)
		at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:182)
		at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:360)
		at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:247)
		at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:104)
		at org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:60)
		at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
		at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
		at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)
16-Dec-2019 14:17:45.339 INFO [http-nio-8080-exec-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Reloading Context with name [] is completed
[http-nio-8080-exec-11] WARN com.vaadin.flow.server.DefaultDeploymentConfiguration - 
====================================================================
Vaadin is running in DEBUG MODE.
In order to run your application in production mode and disable debug features, you should enable it by setting the servlet init parameter productionMode to true.
See https://vaadin.com/docs/v14/flow/production/tutorial-production-mode-basic.html for more information about the production mode.
====================================================================
[http-nio-8080-exec-12] INFO com.vaadin.cdi.CdiInstantiator - Can't find any @VaadinServiceScoped bean implementing 'I18NProvider'. Cannot use CDI beans for I18N, falling back to the default behavior.

While the hot reload technically works, at least the SEVERE error should be addressed for a more polished end-user experience.

Using wildfly-maven-plugin

Hot deployment is currently not supported with the wildfly-maven-plugin:
https://issues.redhat.com/browse/WFMP-71

A typical Wildfly developer would probably use standalone server and JBoss tools IDE integration, which provide hot-deploy capacity. So Wildfly is not a good choice for the CDI starter project, as it requires installation of tools that cannot be automated by Maven.

@denis-anisimov
Copy link
Contributor

denis-anisimov commented Dec 17, 2019

Hotswap is totally broken: it's not able to reload app because it reruns servlet context initializer which reregister the same routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

No branches or pull requests

4 participants