You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/11/10 11:14:05 UTC

[GitHub] [camel-quarkus] tarilabs opened a new issue #3284: quarkus:dev NPE KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)

tarilabs opened a new issue #3284:
URL: https://github.com/apache/camel-quarkus/issues/3284


   Hi, I have a Quarkus application using Apache Camel, Kafka and couple other Quarkus extensions.
   
   - ✅ Running the Tests with `mvn clean install` works perfectly as expected and the tests are passing.
   - ✅ Running the application with the quarkus runnable jar (`java -jar target/quarkus-app/quarkus-run.jar`) is working as expected.
   - ❌ What is not working is the quarkus dev mode with `mvn clean quarkus:dev` which is failing with:
   
   ```
   2021-11-10 12:07:17,880 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (Timer-0) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
   	[error]: Build step org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor#configureKafkaComponentForDevServices threw an exception: java.lang.NullPointerException
   	at org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
   	at java.base/java.lang.Thread.run(Thread.java:834)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:418)
   	at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:289)
   	at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:67)
   	at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:225)
   	at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:208)
   	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:497)
   	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:401)
   	at org.apache.camel.quarkus.core.devmode.CamelHotReplacementSetup$1.run(CamelHotReplacementSetup.java:36)
   	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
   	at java.base/java.util.TimerThread.run(Timer.java:506)
   Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
   	[error]: Build step org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor#configureKafkaComponentForDevServices threw an exception: java.lang.NullPointerException
   	at org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
   	at java.base/java.lang.Thread.run(Thread.java:834)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   	at io.quarkus.builder.Execution.run(Execution.java:116)
   	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
   	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
   	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:416)
   	... 9 more
   Caused by: java.lang.NullPointerException
   	at org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
   	at java.base/java.lang.Thread.run(Thread.java:834)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   ```
   
   Reproducer:
   kindly checkout the Quarkus application from: https://github.com/tarilabs/quarkus-content-based-routing
   `mvn clean install` works
   `mvn clean quarkus:dev` exhibit the issue
   
   Can you kindly advise, please?
   Thanks!


-- 
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] zhfeng commented on issue #3284: quarkus:dev NPE KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)

Posted by GitBox <gi...@apache.org>.
zhfeng commented on issue #3284:
URL: https://github.com/apache/camel-quarkus/issues/3284#issuecomment-965910433


   We need to get the kafka broker from ```DevServicesLauncherConfigResultBuildItem```.


-- 
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] zhfeng edited a comment on issue #3284: quarkus:dev NPE KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)

Posted by GitBox <gi...@apache.org>.
zhfeng edited a comment on issue #3284:
URL: https://github.com/apache/camel-quarkus/issues/3284#issuecomment-965910433


   We need to get the kafka broker info from ```DevServicesLauncherConfigResultBuildItem``` instead of ```DevServicesKafkaBrokerBuildItem```.


-- 
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] zhfeng closed issue #3284: quarkus:dev NPE KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)

Posted by GitBox <gi...@apache.org>.
zhfeng closed issue #3284:
URL: https://github.com/apache/camel-quarkus/issues/3284


   


-- 
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] zhfeng commented on issue #3284: quarkus:dev NPE KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)

Posted by GitBox <gi...@apache.org>.
zhfeng commented on issue #3284:
URL: https://github.com/apache/camel-quarkus/issues/3284#issuecomment-966144701


   @tarilabs feel free to check it with the main branch.


-- 
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] zhfeng commented on issue #3284: quarkus:dev NPE KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:65)

Posted by GitBox <gi...@apache.org>.
zhfeng commented on issue #3284:
URL: https://github.com/apache/camel-quarkus/issues/3284#issuecomment-965091291


   I think it might be an issue in Quarkus DevServicesKafkaProcessor, see
   https://github.com/quarkusio/quarkus/blob/main/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java#L89-L96
   ```java
           if (closeable != null) {
               boolean shouldShutdownTheBroker = !configuration.equals(cfg);
               if (!shouldShutdownTheBroker) {
                   return null;
               }
               shutdownBroker();
               cfg = null;
           }
   ```
   
   It returns ```null``` when there is no changes with configuration which means no needs to restart the kafka container. That cause camel-quarkus-kafka ```KafkaProcessor``` to throw NPE.
   
   So it could be helpful to open a ticket on Quarkus to get some feedback.


-- 
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