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] Oracle SQLcl Version 24.3.0.285.0530 #10006

Open
1 task done
asgeirn opened this issue Nov 1, 2024 · 3 comments
Open
1 task done

[Native Image] Oracle SQLcl Version 24.3.0.285.0530 #10006

asgeirn opened this issue Nov 1, 2024 · 3 comments
Assignees
Labels

Comments

@asgeirn
Copy link

asgeirn commented Nov 1, 2024

Describe the Issue

Attempting to build a native image of Oracle SQLcl Version 24.3.0.285.0530 fails within oracle.jdbc.nativeimage.NativeImageFeature.

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

java version "23.0.1" 2024-10-15
Java(TM) SE Runtime Environment Oracle GraalVM 23.0.1+11.1 (build 23.0.1+11-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 23.0.1+11.1 (build 23.0.1+11-jvmci-b01, mixed mode, sharing)

Operating System and Version

Darwin M-KX6N12W65G 23.6.0 Darwin Kernel Version 23.6.0: Thu Sep 12 23:35:10 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_ARM64_T6030 arm64

Build Command

$JAVA_HOME/bin/native-image --diagnostics-mode --enable-preview --add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.configure=ALL-UNNAMED -cp $(find . -name \*.jar | tr '\n' :) oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli

Expected Behavior

A native image of sqlcl

Actual Behavior

Error: Feature defined by oracle.jdbc.nativeimage.NativeImageFeature unexpectedly failed with a(n) java.lang.NoSuchMethodError. Please report this problem to the authors of oracle.jdbc.nativeimage.NativeImageFeature.

Steps to Reproduce

  1. Download and extract sqlcl
  2. cd into sqlcl
  3. Run the build command above

Additional Context

No response

Build Log Output and Error Messages

Error: Feature defined by oracle.jdbc.nativeimage.NativeImageFeature unexpectedly failed with a(n) java.lang.NoSuchMethodError. Please report this problem to the authors of oracle.jdbc.nativeimage.NativeImageFeature.
Caused by: java.lang.NoSuchMethodError: 'void com.oracle.svm.core.configure.ResourcesRegistry.addResourceBundles(java.lang.String)'
	at oracle.jdbc.nativeimage.NativeImageFeature.beforeAnalysis(NativeImageFeature.java:81)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:822)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:93)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:822)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:554)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:528)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:711)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:139)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
Internal exception: com.oracle.svm.core.util.UserError$UserException: Feature defined by oracle.jdbc.nativeimage.NativeImageFeature unexpectedly failed with a(n) java.lang.NoSuchMethodError. Please report this problem to the authors of oracle.jdbc.nativeimage.NativeImageFeature.
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:97)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.handleFeatureError(FeatureHandler.java:299)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:95)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:822)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:554)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:528)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:711)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:139)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
Caused by: java.lang.NoSuchMethodError: 'void com.oracle.svm.core.configure.ResourcesRegistry.addResourceBundles(java.lang.String)'
	at oracle.jdbc.nativeimage.NativeImageFeature.beforeAnalysis(NativeImageFeature.java:81)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:822)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:93)
	... 7 more
@oubidar-Abderrahim
Copy link
Member

According to the error, oracle.jdbc.nativeimage.NativeImageFeature calls the following Native Image internal function, which is not an API: com.oracle.svm.core.configure.ResourcesRegistry.addResourceBundles(String).
So, this would be an issue for the JDBC team

@oubidar-Abderrahim oubidar-Abderrahim closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2024
@asgeirn
Copy link
Author

asgeirn commented Nov 5, 2024

Could you provide me with directions on where to report this issue?

@oubidar-Abderrahim
Copy link
Member

We contacted the JDBC team and created a internal ticket for this issue

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

No branches or pull requests

2 participants