You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "zeppelinux (via GitHub)" <gi...@apache.org> on 2023/04/26 21:28:57 UTC

[GitHub] [camel-quarkus] zeppelinux opened a new issue, #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

zeppelinux opened a new issue, #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836

   I have a project with bunch of different dependencies and the org.apache.camel.quarkus:camel-quarkus-direct:3.0.0-M1 is one of them.
   I noticed when this dependency is present in a pom.xml the dev mode (quarkus:dev) is broken. If any class is modified, Quarkus fails to replace it via instrumentation:
   `2023-04-26 14:14:40,214 ERROR [io.qua.dep.dev.RuntimeUpdatesProcessor] (Timer-0) Failed to replace classes via instrumentation: java.lang.ClassNotFoundException: com.mypackege.MyClass
           at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
           at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
           at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
           at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:516)
           at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:466)
           at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:496)
           at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:441)
           at org.apache.camel.quarkus.core.devmode.CamelHotReplacementSetup$1.run(CamelHotReplacementSetup.java:36)
           at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
           at java.base/java.util.TimerThread.run(Timer.java:516)
   `
   So, the whole app is restarted, but then there is a problem with JSF/Primefaces renderKit (solved only by mvn clean compile quarkus:dev):
   
   `java.lang.NullPointerException: Cannot invoke "jakarta.faces.render.RenderKit.getResponseStateManager()" because "renderKit" is null
   	at org.apache.myfaces.context.servlet.FacesContextImpl.isPostback(FacesContextImpl.java:408)
   	at jakarta.faces.context.FacesContextWrapper.isPostback(FacesContextWrapper.java:188)
   	at org.primefaces.clientwindow.PrimeClientWindowUtils.isPost(PrimeClientWindowUtils.java:77)
   	at org.primefaces.clientwindow.PrimeClientWindow.decode(PrimeClientWindow.java:61)
   	at org.primefaces.clientwindow.PrimeClientWindowLifecycle.attachWindow(PrimeClientWindowLifecycle.java:50)
   	at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:220)
   	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
   	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
   	at org.omnifaces.filter.CacheControlFilter.doFilter(CacheControlFilter.java:239)
   	at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
   	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
   	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
   	at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:183)
   	at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
   	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
   	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
   	at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:123)
   	at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
   	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
   	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
   	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
   	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63)
   	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
   	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
   	at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:67)
   	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133)
   	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
   	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
   	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65)
   	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
   	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
   	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
   	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
   	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:247)
   	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:56)
   	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:111)
   	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:108)
   	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
   	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
   	at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1.call(UndertowDeploymentRecorder.java:624)
   	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
   	at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:152)
   	at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$1.handleRequest(UndertowDeploymentRecorder.java:124)
   	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:284)
   	at io.undertow.server.DefaultExchangeHandler.handle(DefaultExchangeHandler.java:18)
   	at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$5$2.run(UndertowDeploymentRecorder.java:439)
   	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
   	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
   	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.base/java.lang.Thread.run(Thread.java:833)`
   
   If I remove the camel-quarkus-direct dependency from the pom - dev mode (and instrumentation) is fully functional again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on issue #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836#issuecomment-1528717173

   Sorry, I tried only changing html resources and that worked. 
   
   Now when I replace `Ajax Framework` with `Foo Framework` in `AppMenu`, the live reload does not work for me (F5 does not show any change in browser) also in the initial state of the reproducer repo, i.e. without camel-quarkus-direct and without camel-quarkus-bom. 
   You meant this kind of change? Sorry I am new to JSF.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] zeppelinux commented on issue #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

Posted by "zeppelinux (via GitHub)" <gi...@apache.org>.
zeppelinux commented on issue #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836#issuecomment-1528186242

   @ppalaga it still fails on the same "Failed to replace classes... " exception. Without camel in the pom same change in the same class results in this:
    Application restart not required, replacing classes via instrumentation
   2023-04-28 16:16:46,744 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-1) Live reload performed via instrumentation, no restart needed, total time: 1.192s


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on issue #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836#issuecomment-1524080898

   Thanks for the report, @zeppelinux 
   
   Could you please be more specific about how we can reproduce? A minimal runnable zip or git repo would be ideal. "bunch of different dependencies" is really hard to start with.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] zeppelinux commented on issue #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

Posted by "zeppelinux (via GitHub)" <gi...@apache.org>.
zeppelinux commented on issue #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836#issuecomment-1524107128

   Hi @ppalaga, to reproduce checkout https://github.com/melloware/quarkus-faces and add this to the pom.xml
   
           <dependency>
               <groupId>org.apache.camel.quarkus</groupId>
               <artifactId>camel-quarkus-direct</artifactId>
               <version>3.0.0-M1</version>
           </dependency>
   
   Then try to modify any .java file and re-load the page or invoke some ajax action


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on issue #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836#issuecomment-1528093443

   When I import `camel-quarkus-bom` to the dependencyManagement section
   
   ```
               <dependency>
                   <groupId>org.apache.camel.quarkus</groupId>
                   <artifactId>camel-quarkus-bom</artifactId>
                   <version>3.0.0-M1</version>
                   <type>pom</type>
                   <scope>import</scope>
               </dependency>
   ```
   
   then adding/removing camel-quarkus-direct 
   
   ```
           <dependency>
               <groupId>org.apache.camel.quarkus</groupId>
               <artifactId>camel-quarkus-direct</artifactId>
           </dependency>
   ```
   
   does not seem to cause any dev mode issues.
   
   Can you please confirm that adding the BOM solves your issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] zeppelinux commented on issue #4836: Camel (3.0.0-M1) dependencies in the Quarkus 3 project break the dev mode

Posted by "zeppelinux (via GitHub)" <gi...@apache.org>.
zeppelinux commented on issue #4836:
URL: https://github.com/apache/camel-quarkus/issues/4836#issuecomment-1530572227

   No worries @ppalaga, Thanks for looking into it! 
   
   I'm making some minor change in the existing method implementation (no signature change), for example if you change the org.primefaces.showcase.view.ajax.BasicView.java line 65 by removing generics
   
   `countries  = new HashMap()`
   
   and reload the page - no full restart should be triggered, i.e. you should see:
   
   ```
   2023-05-01 16:29:33,253 WARN  [io.qua.dep.dev.JavaCompilationProvider] (vert.x-worker-thread-1) /Users/me/IdeaProjects/tmp/quarkus-faces/src/main/java/org/primefaces/showcase/view/ajax/BasicView.java uses unchecked or unsafe operations., line -1 in /Users/me/IdeaProjects/tmp/quarkus-faces/src/main/java/org/primefaces/showcase/view/ajax/BasicView.java
   2023-05-01 16:29:33,256 WARN  [io.qua.dep.dev.JavaCompilationProvider] (vert.x-worker-thread-1) Recompile with -Xlint:unchecked for details., line -1 in /Users/me/IdeaProjects/tmp/quarkus-faces/src/main/java/org/primefaces/showcase/view/ajax/BasicView.java
   2023-05-01 16:29:33,351 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-1) Application restart not required, replacing classes via instrumentation
   2023-05-01 16:29:33,462 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-1) Live reload performed via instrumentation, no restart needed, total time: 1.446s 
   2023-05-01 16:29:33,980 INFO  [org.pri.sho.uti.VirtualMachine] (executor-thread-1) Used: 158.1 MB Free: 2.0 GB Max: 2.1 GB
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org