-
Notifications
You must be signed in to change notification settings - Fork 89
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
Hibernate spatial failing when running in native #233
Comments
@neogeogre Looks like missing logger reflection entries, similar to what I did in #298 for Hibernate ORM 6.2. Could you maybe try to craft a PR to add missing reflection entries for |
Hey team! Is there any updates on this? I'm having the same issue. Can we temporarily fix this with the |
Should be fixed by #502. As a workaround, you can use with Spring: @SpringBootApplication
@ImportRuntimeHints(DemoApplication.Hints.class)
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
static class Hints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.reflection().registerType(TypeReference.of("org.hibernate.spatial.HSMessageLogger_$logger"),
typeHint -> typeHint.withConstructor(List.of(TypeReference.of("org.jboss.logging.Logger")), ExecutableMode.INVOKE));
}
}
} |
Describe the bug
Hibernate spatial is failing when running in native image.
To Reproduce
Create a spring boot 3.0.2 project using hibernate-spatial in
build.gradle.kts
:implementation("org.hibernate.orm:hibernate-spatial:6.1.7.Final")
application.yaml
:The native image generation is working with
./gradlew clean nativeCompile
, but then running the executable will generate the error log bellow.Expected behavior
Expected behavior is to have the spring boot app starting properly, like it is already the case when using the JVM with
./gradlew bootRun
, the error does not appear.Logs
System Info (please complete the following information):
The text was updated successfully, but these errors were encountered: