Files
hibernate-demo/docs/output/testdb-derby-dialect-not-found.txt

35 lines
2.1 KiB
Plaintext
Executable File

# Two real failures hit while wiring up Derby 10.16.1.1 against Hibernate ORM 7.4.5.Final.
# Both captured verbatim from actual test/debug runs in this sandbox.
## Failure 1: dialect auto-detection refuses to guess for Derby
# (hibernate.dialect NOT set -- relying on JDBC metadata auto-detection, which works fine for
# both H2 and HSQLDB in this same test suite)
org.hibernate.HibernateException: Unable to determine Dialect for Apache Derby 10.16 (please set 'hibernate.dialect' or register a Dialect resolver)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:202)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:86)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$1.execute(JdbcEnvironmentInitiator.java:398)
# Note: the JDBC connection itself succeeded (product name/version WAS read: "Apache Derby
# 10.16") -- this is not a connectivity problem, it's Hibernate's dialect resolver chain simply
# not recognizing that product/version pair anymore.
## Failure 2: the "obvious" fix (set hibernate.dialect explicitly to the old FQCN) also fails
# hibernate.dialect=org.hibernate.dialect.DerbyDialect
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.DerbyDialect]
Caused by: java.lang.ClassNotFoundException: Could not load requested class: org.hibernate.dialect.DerbyDialect
# org.hibernate.dialect.DerbyDialect does not exist anywhere in hibernate-core-7.4.5.Final.jar
# (confirmed: unzip -l hibernate-core-7.4.5.Final.jar | grep -i derby -> zero matches).
## The actual fix
# Add org.hibernate.orm:hibernate-community-dialects:7.4.5.Final (a SEPARATE artifact,
# NOT pulled in by hibernate-core, spring-boot-starter-data-jpa, or any Spring Boot starter)
# and set:
# hibernate.dialect=org.hibernate.community.dialect.DerbyDialect
# Confirmed present: unzip -l hibernate-community-dialects-7.4.5.Final.jar | grep -i derby
# -> org/hibernate/community/dialect/DerbyDialect.class (and DerbyLegacyDialect, for older
# Derby versions, also in this module).