josephearl opened a new issue #3617:
URL: https://github.com/apache/camel-quarkus/issues/3617
I have a Gradle/Java 11 project configured to build a native executable as
follows:
build.gradle:
```
quarkusBuild {
nativeArgs {
containerBuild = true
builderImage =
"quay.io/quarkus/ubi-quarkus-native-image:22.0.0-java11"
}
}
```
application.properties:
```
quarkus.package.type=native
```
As soon as I add the following to my build.gradle to use
camel-quarkus-activemq:
```
implementation
enforcedPlatform("${quarkusPlatformGroupId}:quarkus-camel-bom:${quarkusPlatformVersion}")
implementation 'org.apache.camel.quarkus:camel-quarkus-activemq'
```
then `./gradlew assemble` starts to fail when building the native image with:
```
> Task :quarkusBuild
building quarkus jar
22.0.0-java11: Pulling from quarkus/ubi-quarkus-native-image
Digest:
sha256:9c107acc8f6d05515f5da9e4738125bb40360b5aa093f4e1eea4475042f3733e
Status: Image is up to date for
quay.io/quarkus/ubi-quarkus-native-image:22.0.0-java11
quay.io/quarkus/ubi-quarkus-native-image:22.0.0-java11
========================================================================================================================
GraalVM Native Image: Generating 'code-with-quarkus-1.0.0-SNAPSHOT-runner'...
========================================================================================================================
[1/7] Initializing...
(59.3s @ 0.09GB)
Error: Cannot find
org.springframework.beans.BeanUtils$KotlinDelegate.findPrimaryConstructor,
org.springframework.beans.BeanUtils$KotlinDelegate can not be loaded, due to
kotlin/reflect/KCallable not being available in the classpath. Are you missing
a dependency in your classpath?
com.oracle.svm.core.util.UserError$UserException: Cannot find
org.springframework.beans.BeanUtils$KotlinDelegate.findPrimaryConstructor,
org.springframework.beans.BeanUtils$KotlinDelegate can not be loaded, due to
kotlin/reflect/KCallable not being available in the classpath. Are you missing
a dependency in your classpath?
at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
------------------------------------------------------------------------------------------------------------------------
at
com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:753)
at
com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:368)
at
com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:340)
at
com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:310)
at
com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:266)
at
com.oracle.svm.hosted.NativeImageGenerator.createAnnotationSubstitutionProcessor(NativeImageGenerator.java:889)
at
com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:816)
at
com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:534)
at
com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:494)
at
com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:426)
at
com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:587)
at
com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:126)
at
com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:617)
0.8s (2.4% of total time) in 14 GCs | Peak RSS:
0.81GB | CPU load: 1.49
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
/project/code-with-quarkus-1.0.0-SNAPSHOT-runner.build_artifacts.txt
========================================================================================================================
Failed generating 'code-with-quarkus-1.0.0-SNAPSHOT-runner' after 31.5s.
Error: Image build request failed with exit status 1
> Task :quarkusBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to
errors
[error]: Build step
io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception:
io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException:
Image generation failed. Exit code: 1
at
io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:391)
at
io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:232)
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:882)
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)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]