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

Spring RabbitMQ integration test fails in native mode with Camel 3.9.0 #2340

Closed
jamesnetherton opened this issue Mar 17, 2021 · 4 comments · Fixed by #2415
Closed

Spring RabbitMQ integration test fails in native mode with Camel 3.9.0 #2340

jamesnetherton opened this issue Mar 17, 2021 · 4 comments · Fixed by #2415
Assignees
Labels
bug Something isn't working test
Milestone

Comments

@jamesnetherton
Copy link
Contributor

Seems usage of AbstractMessageListenerContainer is a new thing. Some additional proxy configuration looks to be required. May also need to cut out the MicroMeter code paths, but I have not dug into the details. For now the native IT will be disabled.

2021-03-17 08:00:30,342 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer$ContainerDelegate, interface org.springframework.aop.SpringProxy, interface org.springframework.aop.framework.Advised, interface org.springframework.core.DecoratingProxy] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
@JiriOndrusek
Copy link
Contributor

JiriOndrusek commented Mar 19, 2021

@jamesnetherton @ppalaga

Is there some special configuration, to make the test fail?

@jamesnetherton
Copy link
Contributor Author

It still fails for me. Are you building with the latest 3.9.0-SNAPSHOT?

@JiriOndrusek
Copy link
Contributor

I have a few days old camel - my bad, I'll update all and try again,
thanks for the confirmation.

@ppalaga
Copy link
Contributor

ppalaga commented Mar 25, 2021

Keeping open as, can still see this failure:

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/ppalaga/.sdkman/candidates/java/21.0.0.r11-grl/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Duser.country=IE -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar camel-quarkus-integration-test-spring-rabbitmq-1.8.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:NativeLinkerOption=-no-pie --no-server -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-spring-rabbitmq-1.8.0-SNAPSHOT-runner
[camel-quarkus-integration-test-spring-rabbitmq-1.8.0-SNAPSHOT-runner:490466]    classlist:   2,070.42 ms,  1.19 GB
[camel-quarkus-integration-test-spring-rabbitmq-1.8.0-SNAPSHOT-runner:490466]        (cap):     500.50 ms,  1.19 GB
[camel-quarkus-integration-test-spring-rabbitmq-1.8.0-SNAPSHOT-runner:490466]        setup:   1,898.89 ms,  1.19 GB
[camel-quarkus-integration-test-spring-rabbitmq-1.8.0-SNAPSHOT-runner:490466]     analysis:   7,960.13 ms,  2.70 GB
Fatal error:com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing com.oracle.svm.reflect.ClassLoader_defineClass_cab4c2cb6585f90fcf53a356910d78404091a4e3.invoke(java.lang.Object, java.lang.Object[]) 
Parsing context:
        parsing java.lang.reflect.Method.invoke(Method.java:566)
        parsing javax.enterprise.util.AnnotationLiteral.invoke(AnnotationLiteral.java:288)
        parsing javax.enterprise.util.AnnotationLiteral.getMemberValue(AnnotationLiteral.java:276)
        parsing javax.enterprise.util.AnnotationLiteral.toString(AnnotationLiteral.java:135)
        parsing java.lang.String.valueOf(String.java:2951)
        parsing java.lang.StringBuilder.append(StringBuilder.java:168)
        parsing java.lang.Throwable.printStackTrace(Throwable.java:662)
        parsing java.lang.Throwable.printStackTrace(Throwable.java:648)
        parsing java.lang.Throwable.printStackTrace(Throwable.java:639)
        parsing com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:759)
        parsing com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

        at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:138)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:331)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
        at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultVirtualInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:227)
        at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
        at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
        at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:547)
        at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.lookup(AnnotationSubstitutionProcessor.java:187)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:128)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:128)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:409)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:389)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:77)
        at com.oracle.graal.pointsto.infrastructure.UniverseMetaAccess.lookupJavaMethod(UniverseMetaAccess.java:93)
        at com.oracle.graal.pointsto.meta.AnalysisMetaAccess.lookupJavaMethod(AnalysisMetaAccess.java:66)
        at com.oracle.graal.pointsto.meta.AnalysisMetaAccess.lookupJavaMethod(AnalysisMetaAccess.java:39)
        at com.oracle.svm.reflect.hosted.ReflectionSubstitutionType$ReflectiveInvokeMethod.buildGraph(ReflectionSubstitutionType.java:541)
        at com.oracle.graal.pointsto.meta.AnalysisMethod.buildGraph(AnalysisMethod.java:333)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:187)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
        ... 13 more
Error: Image build request failed with exit status 1

The only significant change before and after the commit 72d67f0 that breaks this is the upgrade of spring from 5.3.3 to 5.3.5. As a workaround I am thus forcing 5.3.3 in our parent pom for now.

ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Mar 25, 2021
ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Mar 25, 2021
ppalaga added a commit that referenced this issue Mar 26, 2021
@ppalaga ppalaga added the test label Mar 29, 2021
@ppalaga ppalaga added this to the 1.8.1 milestone Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants