-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
[spring-boot-starter-jooq] Jooq doen't work properly with spring boot 3.0.0 native #33552
Comments
We have an open issue to add a smoke test to ensure jOOQ works but it looks like it will require additional hints. There's an open ticket on the jOOQ issue tracker about supporting GraalVM and there's also the option of contributing graalvm-reachability-metadata which Spring Boot could use. In short, I think this is a jOOQ or graalvm-reachability-metadata issue and not something we can fix directly in Spring Boot. |
For anyone looking for a quick fix, until support has been added to graalvm-reachability-metadata. @Configuration
@ImportRuntimeHints(ThirdPartyHintsRegistrar.class)
public class NativeImageRuntimeHintsConfiguration {
static class ThirdPartyHintsRegistrar implements RuntimeHintsRegistrar {
@Override
public void registerHints(final RuntimeHints hints, final ClassLoader classLoader) {
// Temporary hints which should be included into the libraries, or https://github.com/oracle/graalvm-reachability-metadata
List.of(
"java.time.LocalDate[]",
"java.time.LocalDateTime[]",
"java.time.LocalTime[]",
"java.time.ZonedDateTime[]",
"java.time.OffsetDateTime[]",
"java.time.OffsetTime[]",
"java.time.Instant[]",
"java.sql.Timestamp[]",
"java.sql.Date[]",
"java.sql.Time[]",
"java.math.BigInteger[]",
"java.math.BigDecimal[]",
"org.jooq.types.UNumber[]",
"org.jooq.types.UByte[]",
"org.jooq.types.UInteger[]",
"org.jooq.types.ULong[]",
"org.jooq.types.Unsigned[]",
"org.jooq.types.UShort[]",
"java.lang.Byte[]",
"java.lang.Integer[]",
"java.lang.Long[]",
"java.lang.Float[]",
"java.lang.Double[]",
"java.lang.String[]",
"org.jooq.types.YearToMonth[]",
"org.jooq.types.YearToSecond[]",
"org.jooq.types.DayToSecond[]",
"org.jooq.RowId[]",
"org.jooq.Result[]",
"org.jooq.Record[]",
"org.jooq.JSON[]",
"org.jooq.JSONB[]",
"org.jooq.XML[]",
"org.jooq.Geography[]",
"org.jooq.Geometry[]",
"java.util.UUID[]",
"byte[]",
"org.jooq.impl.SQLDataType",
"org.jooq.util.cubrid.CUBRIDDataType",
"org.jooq.util.derby.DerbyDataType",
"org.jooq.util.firebird.FirebirdDataType",
"org.jooq.util.h2.H2DataType",
"org.jooq.util.hsqldb.HSQLDBDataType",
"org.jooq.util.ignite.IgniteDataType",
"org.jooq.util.mariadb.MariaDBDataType",
"org.jooq.util.mysql.MySQLDataType",
"org.jooq.util.postgres.PostgresDataType",
"org.jooq.util.sqlite.SQLiteDataType",
"org.jooq.util.oracle.OracleDataType",
"org.jooq.util.sqlserver.SQLServerDataType",
"org.jooq.impl.DefaultBinding$Mdsys",
"org.jooq.impl.DefaultBinding$SdoElemInfoArray",
"org.jooq.impl.DefaultBinding$SdoOrdinateArray",
"org.jooq.impl.DefaultBinding$SdoGeometry",
"org.jooq.impl.DefaultBinding$SdoGeometryRecord",
"org.jooq.impl.DefaultBinding$SdoPointType",
"org.jooq.impl.DefaultBinding$SdoPointTypeRecord"
).forEach(it -> {
hints.reflection().registerType(TypeReference.of(it), MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);
});
}
}
} |
Hi,
I successfully build and run spring boot native app, but I can't fetch data with jooq from postgresql. It shows following error:
The text was updated successfully, but these errors were encountered: