Add Hibernate 7 batches 2-6, batch 7, and batch 8: mapping styles, JPA annotations, natural IDs, @Immutable, stored procedures, in-memory test databases, JNDI mocking, proxies, associations, temporal mapping, named queries, HQL, Criteria API, EntityManager bootstrapping, Ehcache 3 L2 cache configuration, HikariCP connection pooling, Hibernate Validator CDI integration, aggregate functions, sorting, pagination, interceptors, and Hibernate Search 8 (Hibernate 7.4.5.Final + Spring Boot 4.1.1 + JDK 25)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
@JdbcTypeCode(SqlTypes.JSON) with NO JSON provider on the classpath.
|
||||
|
||||
Reproduced by removing tools.jackson.core:jackson-databind and excluding
|
||||
spring-boot-starter-jackson from spring-boot-starter-web, leaving zero JSON
|
||||
providers on the test classpath:
|
||||
|
||||
$ mvn -o -B dependency:list -DincludeScope=test | grep -icE 'jackson-databind|yasson|johnzon'
|
||||
0
|
||||
|
||||
$ mvn -o -B test -Dtest=JsonColumnOnH2Test
|
||||
org.hibernate.HibernateException: Could not find a FormatMapper for the JSON format, which is required for mapping JSON types. JSON FormatMapper configuration is automatic, but requires that you have either Jackson or a JSONB implementation like Yasson on the class path.
|
||||
|
||||
Put either Jackson or a JSONB implementation back on the classpath and the same
|
||||
test passes. spring-boot-starter-data-jpa on its own does not bring one:
|
||||
|
||||
$ mvn -o -B test -Dtest=JsonColumnOnH2Test # with tools.jackson.core:jackson-databind present
|
||||
[INFO] BUILD SUCCESS
|
||||
Reference in New Issue
Block a user