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 2020/09/25 12:32:24 UTC

[GitHub] [camel-quarkus] ppalaga opened a new issue #1840: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.()

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


   Happens also in JVM mode
   
   ```
   2020-09-25 14:30:12,688 ERROR [io.qua.application] (main) Failed to start application (with profile test): java.lang.RuntimeException: java.lang.RuntimeException: org.apache.camel.RuntimeCamelException: java.lang.NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.<init>()
           at org.apache.camel.quarkus.core.CamelContextRecorder.addRoutes(CamelContextRecorder.java:87)
           at io.quarkus.deployment.steps.CamelContextProcessor$runtime-2011798157.deploy_0(CamelContextProcessor$runtime-2011798157.zig:77)
           at io.quarkus.deployment.steps.CamelContextProcessor$runtime-2011798157.deploy(CamelContextProcessor$runtime-2011798157.zig:40)
           at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:587)
           at io.quarkus.runtime.Application.start(Application.java:90)
           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.runner.bootstrap.StartupActionImpl.run(StartupActionImpl.java:212)
           at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:232)
           at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:504)
           at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:537)
           at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassBasedTestDescriptor.java:359)
           at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
           at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:359)
           at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:189)
           at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:132)
           at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
           at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
           at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
           at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
           at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
           at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
           at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
           at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
           at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
           at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
           at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
           at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
           at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
           at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
           at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
           at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
           at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
           at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
           at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
           at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
           at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
           at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
           at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
   Caused by: java.lang.RuntimeException: org.apache.camel.RuntimeCamelException: java.lang.NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.<init>()
           at org.apache.camel.quarkus.core.CamelContextRecorder.addRoutes(CamelContextRecorder.java:96)
           at org.apache.camel.quarkus.core.CamelContextRecorder.addRoutes(CamelContextRecorder.java:83)
           ... 49 more
   Caused by: org.apache.camel.RuntimeCamelException: java.lang.NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.<init>()
           at org.apache.camel.support.ObjectHelper.newInstance(ObjectHelper.java:222)
           at org.apache.camel.impl.engine.DefaultInjector.newInstance(DefaultInjector.java:65)
           at org.apache.camel.impl.engine.DefaultInjector.newInstance(DefaultInjector.java:44)
           at org.apache.camel.quarkus.core.CamelContextRecorder.addRoutes(CamelContextRecorder.java:94)
           ... 50 more
   Caused by: java.lang.NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.<init>()
           at java.base/java.lang.Class.getConstructor0(Class.java:3349)
           at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2553)
           at org.apache.camel.support.ObjectHelper.newInstance(ObjectHelper.java:220)
           ... 53 more
   ```
   
   Workaround: add the following to application properties:
   
   ```
   quarkus.camel.routes-discovery.exclude-patterns = org/apache/camel/service/lra/LRASagaRoutes
   ```
   
   


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

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



[GitHub] [camel-quarkus] ppalaga commented on issue #1840: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.()

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


   I'd introduce a `RoutesBuilderClassExcludeBuildItem` unless anybody has a better idea.


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

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



[GitHub] [camel-quarkus] jamesnetherton commented on issue #1840: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.()

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


   > camel-lra instantiates `LRASagaRoutes` programmatically, providing a `LRASagaService` to the `LRASagaRoutes(LRASagaService sagaService)` constructor. I think it is really not a good idea to let Camel Quarkus Core to instantiate it
   
   Ok, understood. Then I guess `RoutesBuilderClassExcludeBuildItem` makes sense :+1: 


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

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



[GitHub] [camel-quarkus] jamesnetherton commented on issue #1840: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.()

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


   > I'd introduce a `RoutesBuilderClassExcludeBuildItem` unless anybody has a better idea.
   
   Is `LRASagaRoutes` a fundamental component of camel-lra? If it is, excluding it is just a hack to make the build successful. I.e we should perhaps consider pulling support for the extension until the underlying problem(s) are fixed.


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

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



[GitHub] [camel-quarkus] ppalaga closed issue #1840: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.()

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


   


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

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



[GitHub] [camel-quarkus] ppalaga commented on issue #1840: NoSuchMethodException: org.apache.camel.service.lra.LRASagaRoutes.()

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


   camel-lra instantiates `LRASagaRoutes` programmatically, providing a `LRASagaService` to the `LRASagaRoutes(LRASagaService sagaService)` constructor. I think it is really not a good idea to let Camel Quarkus Core to instantiate it. Of course unless we redesign camel-lra to suit better what Camel Quarkus expects. Yes, we will perhaps need to change camel-lra anyway, when porting to native. The solution with `RoutesBuilderClassExcludeBuildItem` only aims at improving the UX of camel-lra in JVM mode, so that it is there for Camel K.
   
   I was also thinking of excluding all RoutesBuilder classes which do not have a no-args constructor. I do not think it is a good idea because RoutesBuilders may lack no-args constructors for other reasons too - e.g. by mistake.


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

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