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

[native-image] integration-tests/amazon-lambda-rest, UserException: Annotated class must be final #19886

Closed
Karm opened this issue Sep 2, 2021 · 2 comments · Fixed by #19887
Milestone

Comments

@Karm
Copy link
Member

Karm commented Sep 2, 2021

Describe the bug

Both Quarkus 2.2.0.Final and a contemporary main (head 94ae125) fail integration-tests/amazon-lambda-rest regardless of the native-image distribution, being it 21.3.0-devd63e6aab07 Mandrel Distribution (Java Version 11.0.13-ea+3), or GraalVM Version 20.3.2 (Java Version 11.0.11+8-jvmci-20.3-b15) or GraalVM 21.2.0 Java 11 CE (Java Version 11.0.12+6-jvmci-21.2-b08) with this at build time:

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=3 -J-Duser.language=en -J-Duser.country=US -J-Dfile.encoding=UTF-8 -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:NativeLinkerOption=-no-pie -H:-UseServiceLoaderFeature -H:+StackTrace -H:-ParseOnce quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-runner -jar quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-runner.jar
[quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-runner:101012]    classlist:   1,981.69 ms,  1.19 GB
[quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-runner:101012]        setup:     462.45 ms,  1.19 GB
Error: Annotated class must be final: class io.quarkus.amazon.lambda.http.graal.LambdaContainerHandlerSubstitution
com.oracle.svm.core.util.UserError$UserException: Annotated class must be final: class io.quarkus.amazon.lambda.http.graal.LambdaContainerHandlerSubstitution
	at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
	at com.oracle.svm.core.util.UserError.guarantee(UserError.java:96)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:280)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:266)
	at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:936)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:868)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)
	at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:491)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:380)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:543)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
	at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:573)
[quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-runner:101012]      [total]:   2,489.69 ms,  1.19 GB
# Printing build artifacts to: /home/karm/workspaceRH/quarkus/integration-tests/amazon-lambda-rest/target/quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-native-image-source-jar/quarkus-integration-test-amazon-lambda-rest-999-SNAPSHOT-runner.build_artifacts.txt
Error: Image build request failed with exit status 1

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@Karm Karm added the kind/bug Something isn't working label Sep 2, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 2, 2021

@Karm
Copy link
Member Author

Karm commented Sep 2, 2021

Ouch, I wish @quarkus-bot hadn't spammed so many people with this 🙈

/cc @ galderz, @ matejvasek, @ patriot1burke, @ zakkak

@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 3, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.2.Final Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants