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

JavaShell DSL native compilation fails on GraalVM 22.2 #4458

Closed
essobedo opened this issue Jan 30, 2023 · 5 comments
Closed

JavaShell DSL native compilation fails on GraalVM 22.2 #4458

essobedo opened this issue Jan 30, 2023 · 5 comments

Comments

@essobedo
Copy link
Contributor

essobedo commented Jan 30, 2023

If we try to launch the integration test of the JavaShell DSL against the docker image quay.io/quarkus/ubi-quarkus-mandrel:22.2.0.0-Final-java11, it fails with the next error:

Error: Cannot find org.apache.camel.dsl.jsh.JshRoutesBuilderLoader.loadRoutesBuilder, org.apache.camel.dsl.jsh.JshRoutesBuilderLoader can not be loaded, due to jdk/jshell/execution/LoaderDelegate not being available in the classpath. Are you missing a dependency in your classpath?
com.oracle.svm.core.util.UserError$UserException: Cannot find org.apache.camel.dsl.jsh.JshRoutesBuilderLoader.loadRoutesBuilder, org.apache.camel.dsl.jsh.JshRoutesBuilderLoader can not be loaded, due to jdk/jshell/execution/LoaderDelegate not being available in the classpath. Are you missing a dependency in your classpath?
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:72)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:808)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:423)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:395)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:368)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:324)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.createAnnotationSubstitutionProcessor(NativeImageGenerator.java:941)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:854)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:561)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:521)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:407)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
@essobedo essobedo self-assigned this Jan 30, 2023
@ppalaga
Copy link
Contributor

ppalaga commented Jan 30, 2023

@essobedo is this mandrel:22.2specific? I wonder whether the same issue occurs with the newest 22.3.1 ?

@essobedo
Copy link
Contributor Author

@ppalaga Good question, I've just tried with the latest tag and it compiles with success but starting from Mandrel 22.3 only Java 17 is supported so before closing it I need to know first if it is doable to upgrade the root docker image of Camel-K.

@essobedo
Copy link
Contributor Author

essobedo commented Jan 30, 2023

After a deeper investigation, it appears that it is not mandrel related as the bug can also be reproduced on GraalVM 22.2

@essobedo essobedo changed the title JavaShell DSL native compilation fails on Mandrel JavaShell DSL native compilation fails on GraalVM 22.2 Jan 30, 2023
@essobedo
Copy link
Contributor Author

Since Mandrel cannot be upgraded in Camel-K for now because of the lack of Java 11 support of Mandrel 22.3, I will propose a workaround of the same type as what have been done for #3617

@essobedo essobedo removed their assignment Feb 9, 2023
@jamesnetherton
Copy link
Contributor

JSH-DSL will be marked as deprecated in Camel 4.6.0 / CQ 3.11.0. So there's not much value in investing time here IMO.

@jamesnetherton jamesnetherton closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
@github-actions github-actions bot added this to the No fix/wont't fix milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants