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 build failure #597

Closed
kathirsvn opened this issue Oct 27, 2023 · 0 comments · Fixed by #598
Closed

Native Image build failure #597

kathirsvn opened this issue Oct 27, 2023 · 0 comments · Fixed by #598

Comments

@kathirsvn
Copy link
Contributor

Once we add com.datastax.oss:java-driver-core dependency, native image building fails with below error

com.oracle.svm.core.util.UserError$UserException: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.net.Inet4Address.
Detailed message:
Trace: Object was reached by
  reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of constant 
    java.net.InetSocketAddress$InetSocketAddressHolder@7eda691c: /127.0.0.1:9042
  reading field java.net.InetSocketAddress.holder of constant 
    java.net.InetSocketAddress@5ce0e1c8: /127.0.0.1:9042
  reading field com.datastax.oss.driver.internal.core.metadata.DefaultEndPoint.address of constant 
    com.datastax.oss.driver.internal.core.metadata.DefaultEndPoint@cb54a5b: /127.0.0.1:9042
  scanning root com.datastax.oss.driver.internal.core.metadata.DefaultEndPoint@cb54a5b: /127.0.0.1:9042 embedded in 
    com.datastax.oss.driver.internal.core.metadata.MetadataManager.addContactPoints(MetadataManager.java:138)
  parsing method com.datastax.oss.driver.internal.core.metadata.MetadataManager.addContactPoints(MetadataManager.java:136) reachable via the parsing context
    at com.datastax.oss.driver.internal.core.session.DefaultSession$SingleThreaded.init(DefaultSession.java:382)
    at com.datastax.oss.driver.internal.core.session.DefaultSession$SingleThreaded.access$1100(DefaultSession.java:300)
    at com.datastax.oss.driver.internal.core.session.DefaultSession.lambda$init$0(DefaultSession.java:146)
    at com.datastax.oss.driver.internal.core.session.DefaultSession$$Lambda$2757/0x00000007c2595cf0.run(Unknown Source)
    at java.lang.Shutdown.runHooks(Shutdown.java:130)
    at java.lang.Shutdown.exit(Shutdown.java:173)
    at com.oracle.svm.core.graal.snippets.CEntryPointSnippets.initializeIsolate(CEntryPointSnippets.java:334)
    at static root method.(Unknown Source)


	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:248)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:798)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:582)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
------------------------------------------------------------------------------------------------------------------------
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)

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

Successfully merging a pull request may close this issue.

1 participant