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

MappedByteBufferReplacement substitutions is obsolete in JDK16 #15903

Closed
cstancu opened this issue Mar 21, 2021 · 2 comments · Fixed by #15910
Closed

MappedByteBufferReplacement substitutions is obsolete in JDK16 #15903

cstancu opened this issue Mar 21, 2021 · 2 comments · Fixed by #15910
Labels
env/graalvm-java11 Relating to using GraalVM native image generation on Java 11 kind/bug Something isn't working
Milestone

Comments

@cstancu
Copy link

cstancu commented Mar 21, 2021

Describe the bug

Trying to build a simple Quarkus Native Image application with a JDK16 based GraalVM results in

Error: Could not find target method: private void io.quarkus.runtime.graal.MappedByteBufferReplacement.force0(java.io.FileDescriptor,long,long)
com.oracle.svm.core.util.UserError$UserException: Could not find target method: private void io.quarkus.runtime.graal.MappedByteBufferReplacement.force0(java.io.FileDescriptor,long,long)
	at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:734)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:366)
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:338)
	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.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:952)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:886)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:578)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:493)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1414)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

The target method MappedByteBuffer.force0 has been removed in JDK16.

Note: A JDK16 GraalVM is not widely available yet, it must be built from source.

@cstancu cstancu added the kind/bug Something isn't working label Mar 21, 2021
@gastaldi gastaldi added triage/upstream env/graalvm-java11 Relating to using GraalVM native image generation on Java 11 and removed triage/needs-triage labels Mar 21, 2021
@quarkus-bot quarkus-bot bot added this to the 1.14 - main milestone Mar 22, 2021
@gsmet
Copy link
Member

gsmet commented Mar 22, 2021

Thanks for the report @cstancu !

mcasperson added a commit to mcasperson/auth0quarkusdemo that referenced this issue May 26, 2021
@anthonyikeda
Copy link

The JDK16 GraalVM is now available. How do I make the native image? I still get the same error using GraalVM:

$ java -version
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment GraalVM CE 21.2.0 (build 16.0.2+7-jvmci-21.2-b08)
OpenJDK 64-Bit Server VM GraalVM CE 21.2.0 (build 16.0.2+7-jvmci-21.2-b08, mixed mode, sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env/graalvm-java11 Relating to using GraalVM native image generation on Java 11 kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants