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 error #979

Open
lost22git opened this issue Sep 22, 2023 · 2 comments
Open

native image error #979

lost22git opened this issue Sep 22, 2023 · 2 comments

Comments

@lost22git
Copy link

lost22git commented Sep 22, 2023

  • graalvm version:
openjdk 21 2023-09-19
OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
  • gradle version
gradle-8.4-rc-1
  • sql-jdbc version
org.xerial:sqlite-jdbc:3.43.0.0
  • build.gradle
graalvmNative {
  binaries {
    main {
       buildArgs.addAll([
"-Dorg.sqlite.lib.exportPath=${project.layout.buildDirectory.get()}"
       ])
    }
  }
}
  • error info when native compile
[1/8] Initializing...                                                                                    (0.0s @ 0.07GB)
Error: Feature org.sqlite.nativeimage.SqliteJdbcFeature class not found on the classpath. Ensure that the name is correct and that the class is on the classpath.
com.oracle.svm.core.util.UserError$UserException: Feature org.sqlite.nativeimage.SqliteJdbcFeature class not found on the classpath. Ensure that the name is correct and that the class is on the classpath.
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
------------------------------------------------------------------------------------------------------------------------
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.registerFeatures(FeatureHandler.java:183)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:897)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:591)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:551)
        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)
                        0.2s (4.1% of total time) in 16 GCs | Peak RSS: 0.47GB | CPU load: 2.92
@kkriske
Copy link
Contributor

kkriske commented Sep 29, 2023

Could this be specific to gradle (you are using a pre-release version)? CI runs on GraalVM 21 without issues: #983
Gradle seems to maybe not pick up the META-INF/versions/9 files from the multi-release jar, where the SqliteJdbcFeature class is located.

@lost22git
Copy link
Author

Maybe I need to invite a gradle expert @melix to help take a look at this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants