You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jamesnetherton (via GitHub)" <gi...@apache.org> on 2023/10/19 10:45:37 UTC

[I] SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21 [camel-quarkus]

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

   ### Bug description
   
   Bit confused as to what's going on here. `SimpleIT` when run in isolation within `integration-test-groups/foundation/core-languages` passes. When the test is run 'grouped' in `integration-tests/foundation-grouped` it fails with:
   
   ```
   2023-10-19 11:17:05,014 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /core-languages/route/simpleExchangeMethods/String failed, error id: 4194163d-7dce-4450-8798-d31e732c4d0b-1: org.jboss.resteasy.spi.UnhandledException: org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively invoke method public abstract org.apache.camel.Message org.apache.camel.Exchange.getMessage() without it being registered for runtime reflection. Add public abstract org.apache.camel.Message org.apache.camel.Exchange.getMessage() to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.
           at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:107)
           at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:344)
           at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:205)
           at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:452)
           at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:240)
           at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)
           at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
           at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:157)
           at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:229)
           at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:82)
           at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:147)
           at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:93)
           at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
           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@21/java.lang.Thread.runWith(Thread.java:1596)
           at java.base@21/java.lang.Thread.run(Thread.java:1583)
           at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833)
           at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
   Caused by: org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively invoke method public abstract org.apache.camel.Message org.apache.camel.Exchange.getMessage() without it being registered for runtime reflection. Add public abstract org.apache.camel.Message org.apache.camel.Exchange.getMessage() to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.
           at org.graalvm.nativeimage.builder/com.oracle.svm.core.reflect.MissingReflectionRegistrationUtils.forQueriedOnlyExecutable(MissingReflectionRegistrationUtils.java:72)
           at java.base@21/java.lang.reflect.Method.acquireMethodAccessor(Method.java:77)
           at java.base@21/java.lang.reflect.Method.invoke(Method.java:577)
           at org.apache.camel.support.ObjectHelper.invokeMethodSafe(ObjectHelper.java:385)
           at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:493)
           at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:315)
           at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:285)
           at org.apache.camel.component.bean.AbstractBeanProcessor.useMethodInvocation(AbstractBeanProcessor.java:122)
           at org.apache.camel.component.bean.AbstractBeanProcessor.process(AbstractBeanProcessor.java:88)
           at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:81)
           at org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:32)
           at org.apache.camel.language.bean.BeanExpression.invokeBean(BeanExpression.java:364)
           at org.apache.camel.language.bean.BeanExpression.invokeOgnlMethod(BeanExpression.java:466)
           at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:216)
           at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:230)
           at org.apache.camel.language.simple.SimpleExpressionBuilder$29.evaluate(SimpleExpressionBuilder.java:761)
           at org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
           at org.apache.camel.support.builder.ExpressionBuilder$55.evaluate(ExpressionBuilder.java:1709)
           at org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
           at org.apache.camel.processor.TransformProcessor.process(TransformProcessor.java:47)
           at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:824)
           at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:732)
           at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.executeReactiveWork(DefaultReactiveExecutor.java:196)
           at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:164)
           at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59)
           at org.apache.camel.processor.Pipeline.process(Pipeline.java:163)
           at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:383)
           at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:96)
           at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)
           at org.apache.camel.impl.engine.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:109)
           at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:81)
           at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:106)
           at org.apache.camel.support.cache.DefaultProducerCache.send(DefaultProducerCache.java:180)
           at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
           at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
           at org.apache.camel.impl.engine.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:413)
           at org.apache.camel.quarkus.core.languages.it.CoreLanguagesResource.resource(CoreLanguagesResource.java:66)
           at org.apache.camel.quarkus.core.languages.it.CoreLanguagesResource_ClientProxy.resource(Unknown Source)
           at java.base@21/java.lang.reflect.Method.invoke(Method.java:580)
           at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
           at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:118)
           at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:560)
           at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:452)
           at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:413)
           at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
           at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:415)
           at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:378)
           at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:356)
           at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:70)
           at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:429)
           ... 18 more
   ```


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


Re: [I] SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21 [camel-quarkus]

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

   I took a look at this test and it seems only failing by combine with `foundation/core` tests. And the following property looks like related to the errors.
   
   ```properties
   quarkus.camel.native.reflection.serialization-enabled = true
   ```
   
   I will keep investigating.


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


Re: [I] SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21 [camel-quarkus]

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

   Well, if I remove `CamelExecutionException` in `extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java`
   
   Then `SimpleIT` is back to work with `quarkus.camel.native.reflection.serialization-enabled = true`
   
   I found `CamelExecutionException` and `RuntimeCamelException` were added to fix 
   - https://github.com/apache/camel-quarkus/issues/1868
   
   And now it seems that this should be fixed by GraalVM and maybe we can remove these classes for registering as serialzation. @jamesnetherton WDYT?


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


Re: [I] SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21 [camel-quarkus]

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

   > And now it seems that this should be fixed by GraalVM and maybe we can remove these classes for registering as serialzation. @jamesnetherton WDYT?
   
   Try it with a PR I guess. Still not sure I fully understand why registering those classes for serialization breaks things....


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


Re: [I] SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21 [camel-quarkus]

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

   @jamesnetherton sure, I send the PR.


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


Re: [I] SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21 [camel-quarkus]

Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng closed issue #5444: SimpleIT.simpleExchangeMethods fails in native mode with Mandrel 23.1 JDK 21
URL: https://github.com/apache/camel-quarkus/issues/5444


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