Description
There is a issue with building native images with
- latest version 1.0.0 for gradle
- in combination with Spring Boot 4.0.5
- and Hibernate Validator present on the classpath
See error below.
Everything is fine with version 0.11.5
** Related Issues **
This is seemingly not the first time it happened:
oracle/graal#5626
oracle/graal#8474
** Fix **
In Spring boot it can be fixed by adding, so i guess reachability metadata is missing
`
hints.reflection().registerType(TypeReference.of("org.hibernate.validator.internal.util.logging.Log_$logger"),
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
hints.reflection().registerType(TypeReference.of("org.hibernate.validator.internal.util.logging.Messages_$bundle"),
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_METHODS).withField("INSTANCE"));
`
** 1st Error **
`
Caused by: java.lang.IllegalArgumentException: Invalid logger interface org.hibernate.validator.internal.util.logging.Log (implementation not found)
at org.jboss.logging.Logger.doGetMessageLogger(Logger.java:2632)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2536)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2521)
at org.hibernate.validator.internal.util.logging.LoggerFactory.make(LoggerFactory.java:21)
`
** 2nd Error **
Caused by: java.lang.IllegalArgumentException: Invalid bundle interface org.hibernate.validator.internal.util.logging.Messages (implementation not found) at org.jboss.logging.Messages.doGetBundle(Messages.java:153) at org.jboss.logging.Messages.getBundle(Messages.java:111) at org.jboss.logging.Messages.getBundle(Messages.java:97) at org.hibernate.validator.internal.util.logging.Messages.<clinit>(Messages.java:20) ... 45 more
Description
There is a issue with building native images with
See error below.
Everything is fine with version 0.11.5
** Related Issues **
This is seemingly not the first time it happened:
oracle/graal#5626
oracle/graal#8474
** Fix **
In Spring boot it can be fixed by adding, so i guess reachability metadata is missing
`
hints.reflection().registerType(TypeReference.of("org.hibernate.validator.internal.util.logging.Log_$logger"),
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
hints.reflection().registerType(TypeReference.of("org.hibernate.validator.internal.util.logging.Messages_$bundle"),
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_METHODS).withField("INSTANCE"));
`
** 1st Error **
`
Caused by: java.lang.IllegalArgumentException: Invalid logger interface org.hibernate.validator.internal.util.logging.Log (implementation not found)
`
** 2nd Error **
Caused by: java.lang.IllegalArgumentException: Invalid bundle interface org.hibernate.validator.internal.util.logging.Messages (implementation not found) at org.jboss.logging.Messages.doGetBundle(Messages.java:153) at org.jboss.logging.Messages.getBundle(Messages.java:111) at org.jboss.logging.Messages.getBundle(Messages.java:97) at org.hibernate.validator.internal.util.logging.Messages.<clinit>(Messages.java:20) ... 45 more