spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
376 stars 309 forks source link

SpringBoot 3 Native/GraalVM com.datastax.oss.driver.internal.core.util.Dependency was unintentionally initialized at build time. #1349

Closed patpatpat123 closed 1 year ago

patpatpat123 commented 1 year ago

Hello Spring Data Cassandra team,

Just wanted to highlight an issue encountered with SpringBoot 3.0.2 and Spring data reactive cassandra when building a native/GraalVM image please.

The issue is only observed during the build of a native/GraalVM image. When building using the usual clean install, the issue is not observed.

When generating the native image, I am facing this:

Error: Classes that should be initialized at run time got initialized during image building:
com.datastax.oss.driver.internal.core.util.Dependency was unintentionally initialized at build time. To see why com.datastax.oss.driver.internal.core.util.Dependency got initialized use --trace-class-initialization=com.datastax.oss.driver.internal.core.util.Dependency
To see how the classes got initialized, use --trace-class-initialization=com.datastax.oss.driver.internal.core.util.Dependency
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception

Could you please let me know what did I do wrong please? Or maybe suggest a Registrar.

Thank you so much

mp911de commented 1 year ago

This is a duplicate of #1340