[native] 1.13.0.Final Fails To Build Native Image
See original GitHub issueDescribe the bug
I got into a problem building native image after upgrading to 1.13.0
saying that it could not find some classes. I fixed it by following this comment and got into another problem that I haven’t found any solution. Here is the error log that I got
Error: Could not find target method: static io.netty.handler.ssl.SslContext io.quarkus.netty.runtime.graal.Target_io_netty_handler_ssl_SslContext.newServerContextInternal(io.netty.handler.ssl.SslProvider,java.security.Provider,java.security.cert.X509Certificate[],javax.net.ssl.TrustManagerFactory,java.security.cert.X509Certificate[],java.security.PrivateKey,java.lang.String,javax.net.ssl.KeyManagerFactory,java.lang.Iterable,io.netty.handler.ssl.CipherSuiteFilter,io.netty.handler.ssl.ApplicationProtocolConfig,long,long,io.netty.handler.ssl.ClientAuth,java.lang.String[],boolean,boolean,java.lang.String) throws javax.net.ssl.SSLException
com.oracle.svm.core.util.UserError$UserException: Could not find target method: static io.netty.handler.ssl.SslContext io.quarkus.netty.runtime.graal.Target_io_netty_handler_ssl_SslContext.newServerContextInternal(io.netty.handler.ssl.SslProvider,java.security.Provider,java.security.cert.X509Certificate[],javax.net.ssl.TrustManagerFactory,java.security.cert.X509Certificate[],java.security.PrivateKey,java.lang.String,javax.net.ssl.KeyManagerFactory,java.lang.Iterable,io.netty.handler.ssl.CipherSuiteFilter,io.netty.handler.ssl.ApplicationProtocolConfig,long,long,io.netty.handler.ssl.ClientAuth,java.lang.String[],boolean,boolean,java.lang.String) throws javax.net.ssl.SSLException
at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:711)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:365)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:337)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:309)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:265)
at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:929)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:863)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:561)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
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)
Error: Image build request failed with exit status 1
This does not happen when I switch back to 1.11.6
and 1.12.x
has this problem #15801.
Environment (please complete the following information):
Output of uname -a
or ver
Darwin local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
Output of java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9)
OpenJDK 64-Bit Server VM (build 11.0.10+9, mixed mode)
GraalVM version (if different from Java)
quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11
Quarkus version or git rev
1.13.0.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
------------------------------------------------------------
Gradle 6.8.3
------------------------------------------------------------
Build time: 2021-02-22 16:13:28 UTC
Revision: 9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.10 (Oracle Corporation 11.0.10+9)
OS: Mac OS X 10.15.7 x86_64
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (12 by maintainers)
Top Results From Across the Web
Quarkus 1.13.0.Final unable to build native image at ...
Quarkus 1.13.0.Final unable to build native image at command line. 361 views ... I use the online generator to generate a basic demo....
Read more >Quarkus native image build fails - java - Stack Overflow
When I am building a native image build I am facing an issue with reflection. com.oracle.svm.hosted.substitute.
Read more >Docker Compose release notes
Docker Compose now uses the native Docker CLI's build command when building images. Set the COMPOSE_DOCKER_CLI_BUILD=0 environment variable to disable this ...
Read more >NativeConfig (Quarkus - Core - Deployment 1.3.1.Final API)
If the native image build should wait for a debugger to be attached before ... If a JVM based 'fallback image' should be...
Read more >release - Quarkus
Final is the third maintenance release of our 2.14 release train. ... If you use Quarkus with GraalVM to build native executables, Quarkus...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
From what I can see here, it’ll already be available as part of 21.1.
I was able to reproduce it with your sample project.
@zakkak do you have any idea what’s triggering this:
It looks like something is trying to delete
javax.security.jacc.PolicyContextException
when building the native image and that it’s not around but I scanned the Quarkus codebase and it doesn’t look like it’s us doing this.