vladmihalcea/hypersistence-utils

Hypersistence error after updating to SpringBoot 3.2.1 with Hibernate 6.4.1.Final

dimasadryantos opened this issue · 2 comments

Describe the bug

Project pom :

<parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>3.2.1</version>
 </parent>

<dependency>
     <groupId>io.hypersistence</groupId>
     <artifactId>hypersistence-utils-hibernate-60</artifactId>
     <version>3.7.0</version>
</dependency>

Hibernate version : 6.4.1.Final

After updating my project using SpringBoot 3.2.1 I got hypersistence run time error :

Caused by: java.lang.AbstractMethodError: Receiver class io.hypersistence.utils.hibernate.type.array.internal.StringArrayTypeDescriptor does not define or inherit an implementation of the resolved method 'abstract org.hibernate.type.BasicType resolveType(org.hibernate.type.spi.TypeConfiguration, org.hibernate.dialect.Dialect, org.hibernate.type.BasicType, org.hibernate.tool.schema.extract.spi.ColumnTypeInformation, org.hibernate.type.descriptor.jdbc.JdbcTypeIndicators)' of interface org.hibernate.type.descriptor.java.BasicPluralJavaType.
	at org.hibernate.loader.ast.internal.MultiKeyLoadHelper.resolveArrayJdbcMapping(MultiKeyLoadHelper.java:51)
	at org.hibernate.loader.ast.internal.MultiIdEntityLoaderArrayParam.<init>(MultiIdEntityLoaderArrayParam.java:58)
	at org.hibernate.persister.entity.AbstractEntityPersister.buildMultiIdLoader(AbstractEntityPersister.java:892)
	at org.hibernate.persister.entity.AbstractEntityPersister.prepareLoaders(AbstractEntityPersister.java:3397)
	at org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.finishInitialization(MappingMetamodelImpl.java:206)
	at org.hibernate.internal.SessionFactoryImpl.initializeMappingModel(SessionFactoryImpl.java:364)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:293)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:450)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1507)
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75)
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396)
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1820)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1769)
	... 97 common frames omitted

Hibernate 6.4 is not formally supported, see #685

Additionally, when it is supported you will likely need to update your hypersistence dependency. Your example show hypersistence-utils-hibernate-60. If you consult the README it lists different artifacts per Hibernate version. You may already have a version mismatch if your project is currently on Spring 3.2.0 and Hibernate 6.3, you should be using hypersistence-utils-hibernate-63 in the case.

Read More:

https://github.com/vladmihalcea/hypersistence-utils?tab=readme-ov-file#installation-guide

Closed as duplicate.