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

Graal VM native image: Substitution target for o.s.o.j.v.Target_BytecodeProvider is not loaded #31452

Closed
mmoayyed opened this issue Oct 18, 2023 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
Milestone

Comments

@mmoayyed
Copy link
Contributor

mmoayyed commented Oct 18, 2023

Environment

Spring Framework: 6.1 RC1

JDK 21 / GraalVM 21

GRAALVM_HOME: /Users/runner/hostedtoolcache/graalvm-jdk-21_macos-x64_bin/21.0.0/x64/graalvm-jdk-21.0.1+12.1/Contents/Home
JAVA_HOME: /Users/runner/hostedtoolcache/graalvm-jdk-21_macos-x64_bin/21.0.0/x64/graalvm-jdk-21.0.1+12.1/Contents/Home
java 21.0.1 20[23](https://github.com/mmoayyed/cas/actions/runs/6553858619/job/17800344875#step:4:24)-10-17
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)
native-image 21.0.1 2023-10-17
GraalVM Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
Substrate VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12, serial gc, compressed references)

GitHub Actions: MacOS
Gradle: 8.4

Error

Native image builds produce the following:

com.oracle.svm.core.util.UserError$UserException: Substitution target for org.springframework.orm.jpa.vendor.Target_BytecodeProvider is not loaded. Use field `onlyWith` in the `TargetClass` annotation to make substitution only active when needed.
[1/8] �]8;;[https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md#stage-initializing�\Initializing�]8;;�\...](https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md#stage-initializing%1B\Initializing%1B]8;;%1B\...)                                                                                    (0.0s @ 0.51GB)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findTargetClass(AnnotationSubstitutionProcessor.java:1074)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:373)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:351)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.createAnnotationSubstitutionProcessor(NativeImageGenerator.java:1029)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:907)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:590)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:538)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:720)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:142)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:97)

Build logs are here.

Steps to reproduce the issue

git clone --depth 1 git@github.com:mmoayyed/cas.git
./gradlew :webapp:cas-server-webapp-native:build :webapp:cas-server-webapp-native:nativeCompile \
	-x check -x test -x javadoc --configure-on-demand --no-configuration-cache \
	-DskipNestedConfigMetadataGen=true --no-daemon
@mmoayyed mmoayyed changed the title Substitution target for o.s.o.j.v.Target_BytecodeProvider is not loaded Graal VM native image: Substitution target for o.s.o.j.v.Target_BytecodeProvider is not loaded Oct 18, 2023
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 18, 2023
@sdeleuze sdeleuze self-assigned this Oct 18, 2023
@sdeleuze sdeleuze added in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 18, 2023
@sdeleuze sdeleuze added this to the 6.1.0-RC2 milestone Oct 18, 2023
sdeleuze added a commit to sdeleuze/spring-framework that referenced this issue Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

3 participants