Migrating from hibernate 5 to 6.0.0.Alpha9

Hi, I’m attempting to migrate existing program from hibernate 5 to 6.0.0.Alpha9. Aware that spring/hibernate6 may not be compatible yet but giving it a try. I’m encountering some exception when trying to startup the application.

Exception

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in class path resource
[com/demo/test/sample/monolith/generated/config/DataBaseConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPoi
nterException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:307)
at com.demo.test.sample.monolith.generated.config.DataBaseConfiguration$$EnhancerBySpringCGLIB$$be3098c6.entityManagerFactory()
at com.demo.test.sample.monolith.generated.config.DataBaseConfiguration.transactionManager(DataBaseConfiguration.java:67)
at com.demo.test.sample.monolith.generated.config.DataBaseConfiguration$$EnhancerBySpringCGLIB$$be3098c6.CGLIB$transactionManager$0()
at com.demo.test.sample.monolith.generated.config.DataBaseConfiguration$$EnhancerBySpringCGLIB$$be3098c6$$FastClassBySpringCGLIB$$438e057.inv
oke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at com.demo.test.sample.monolith.generated.config.DataBaseConfiguration$$EnhancerBySpringCGLIB$$be3098c6.transactionManager()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
… 149 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.hibernate.type.internal.UserTypeJavaTypeWrapper.(UserTypeJavaTypeWrapper.java:49)
at org.hibernate.type.CustomType.(CustomType.java:89)
at org.hibernate.type.CustomType.(CustomType.java:73)
at org.hibernate.boot.model.TypeDefinition.createResolution(TypeDefinition.java:180)
at org.hibernate.boot.model.TypeDefinition.createResolution(TypeDefinition.java:120)
at org.hibernate.boot.model.TypeDefinition.resolve(TypeDefinition.java:104)
at org.hibernate.mapping.BasicValue.interpretExplicitlyNamedType(BasicValue.java:524)
at org.hibernate.mapping.BasicValue.buildResolution(BasicValue.java:281)
at org.hibernate.mapping.BasicValue.resolve(BasicValue.java:249)
at org.hibernate.mapping.BasicValue.resolve(BasicValue.java:239)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.lambda$processValueResolvers$4(InFlightMetadataCollectorImpl.java:1729)
at java.util.ArrayList.removeIf(ArrayList.java:1415)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processValueResolvers(InFlightMetadataCollectorImpl.java:1728)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1714)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.buildMetadataInstance(InFlightMetadataCollectorImpl.java:2298)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:325)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1345)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1416)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistencePro
vider.java:58)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.ja
va:365)
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:341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
… 168 common frames omitted

It seems to be hitting a nullpointer at “org.hibernate.type.internal.UserTypeJavaTypeWrapper.”.

Hi and thanks for testing. What kind of user type are you using? According to the stacktrace, it appears that this user type returns null from org.hibernate.usertype.UserType#returnedClass.

To my knowledge, I did not use any specific classes that implemented UserType. Probably could you point me to a direction I need to check for user type?

It’s hard to say, I would need to see the model. Maybe you can debug to the point where the exception occurs and try to figure out which field is causing this problem?

I might have found the cause for the exception. I have a created another small sample project to test and its giving the same exception

Person.java

package com.example.accessingdatarest;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.SortNatural;
import org.hibernate.envers.Audited;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

@/Entity
@/Table(name = “TBL_PERSON”)
@/Audited
public class Person implements Serializable {

@/Id
@/GeneratedValue(strategy = GenerationType.AUTO)
private long id;

private String firstName;
private String lastName;

@/OneToMany(mappedBy = “person”)
@/SortNatural
private List address;

@/Enumerated(EnumType.STRING)
@/Column(name = “PERSON_TYPE”)
@/Fetch(FetchMode.SELECT)
private PersonType personType = PersonType.ONE;

@/JsonSerialize(using = LocalDateTimeSerializer.class)
@/JsonDeserialize(using = LocalDateTimeDeserializer.class)
@/Column(name = “BIRTHDATE”)
private LocalDate birthdate;

public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public List getAddress() {
return address;
}

public void setAddress(List address) {
this.address = address;
}

// public PersonType getPersonType() {
// return personType;
// }
//
// public void setPersonType(PersonType personType) {
// this.personType = personType;
// }

public LocalDate getBirthdate() {
return birthdate;
}

public void setBirthdate(LocalDate birthdate) {
this.birthdate = birthdate;
}
}

Address.java

package com.example.accessingdatarest;

import org.hibernate.envers.Audited;

import javax.persistence.*;
import java.io.Serializable;

@/Entity
@/Table(name = “TBL_ADDRESS”)
@/Audited
public class Address implements Serializable {

@/Id
@/GeneratedValue(strategy = GenerationType.AUTO)
private long id;

private String address;

@/ManyToOne
private Person person;

public String getAddress() {
    return address;
}

public void setAddress(String address) {
    this.address = address;
}

public Person getPerson() {
    return person;
}

public void setPerson(Person person) {
    this.person = person;
}

}

The above classes will give the same exception.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.8.jar:5.3.8]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.8.jar:5.3.8]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.8.jar:5.3.8]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.2.jar:2.5.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-2.5.2.jar:2.5.2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[spring-boot-2.5.2.jar:2.5.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) ~[spring-boot-2.5.2.jar:2.5.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-2.5.2.jar:2.5.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332) ~[spring-boot-2.5.2.jar:2.5.2]
at com.example.accessingdatarest.AccessingDataRestApplication.main(AccessingDataRestApplication.java:10) ~[classes/:na]
Caused by: java.lang.NullPointerException: null
at org.hibernate.type.internal.UserTypeJavaTypeWrapper.(UserTypeJavaTypeWrapper.java:49) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.type.CustomType.(CustomType.java:89) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.type.CustomType.(CustomType.java:73) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.model.TypeDefinition.createResolution(TypeDefinition.java:180) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.model.TypeDefinition.createResolution(TypeDefinition.java:120) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.model.TypeDefinition.resolve(TypeDefinition.java:104) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.mapping.BasicValue.interpretExplicitlyNamedType(BasicValue.java:524) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.mapping.BasicValue.buildResolution(BasicValue.java:281) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.mapping.BasicValue.resolve(BasicValue.java:249) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.mapping.BasicValue.resolve(BasicValue.java:239) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.lambda$processValueResolvers$4(InFlightMetadataCollectorImpl.java:1729) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at java.base/java.util.ArrayList.removeIf(ArrayList.java:1712) ~[na:na]
at java.base/java.util.ArrayList.removeIf(ArrayList.java:1690) ~[na:na]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processValueResolvers(InFlightMetadataCollectorImpl.java:1728) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1714) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.buildMetadataInstance(InFlightMetadataCollectorImpl.java:2298) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:325) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1345) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1416) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.8.jar:5.3.8]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.8.jar:5.3.8]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.8.jar:5.3.8]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.8.jar:5.3.8]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845) ~[spring-beans-5.3.8.jar:5.3.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-5.3.8.jar:5.3.8]
… 16 common frames omitted

Issue seems to stem from the combination of @/Audited & @/Enumerated

when I only use @/Enumerated. Application is able to start up . Likewise, when i only use @/Audited & comment out the enumerated column, also able to start up.
But when I use both @/Audited & @/Enumerated in the same class. It hits the exception.

Edit: Tried without @Enumerated annotation but still having a enum will cause the exception as well.

Any possible resolution for this?

I have found another weird issue whereby native queries with a list of paramters doesnt work.
Eg. SELECT * FROM table t WHERE t.column in (list parameters);

package com.example.debugsample;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

@Service
public class PersonService {

@Autowired
private PersonRepository personRepository;

@PersistenceContext
private EntityManager entityManager;

private Boolean findByLastName() {
    return true;
}

public void createPerson() {
    Person p = new Person();
    p.setFirstName("test1");
    p.setLastName("test2");
    personRepository.save(p);
}

private int getRandomNumber(int min, int max) {
    return (int) ((Math.random() * (max - min)) + min);
}

private PersonType getRandomPersonType () {
    return PersonType.values()[new Random().nextInt(PersonType.values().length)];
}

public List<Person> getPersonByPersonName() {
    List<String> personNames = new ArrayList<String>();
    personNames.add("test1");

    /* Parameter contains multiple values(in List) -> Doesn't work */
    String sql = "SELECT * FROM TBL_PERSON p where p.first_name in (:names)";
    Query q = entityManager.createNativeQuery(sql, Person.class);
    q.setParameter("names", personNames);
    List<Person> result = q.getResultList();
    System.out.println(result.size());

    /( Using @Query in repository -> Doesn't work */
    List<Person> result = personRepository.getPersonByPersonNames(personNames);
    System.out.println(result.size());

    /* Using spring jpa keywords -> Works */
    List<Person> result = personRepository.findByFirstNameIn(personNames);
    System.out.println(result.size());

    System.out.println("Result size =" + result.size());

    return result;
}

}

Hitting exception

java.lang.IllegalStateException: Binding is multi-valued; illegal call to #getBindValue
at org.hibernate.query.internal.QueryParameterBindingImpl.getBindValue(QueryParameterBindingImpl.java:96) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.query.sql.internal.NativeSelectQueryPlanImpl.performList(NativeSelectQueryPlanImpl.java:112) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.query.sql.internal.NativeQueryImpl.doList(NativeQueryImpl.java:484) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.query.spi.AbstractQuery.list(AbstractQuery.java:1372) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at org.hibernate.query.Query.getResultList(Query.java:131) ~[hibernate-core-6.0.0.Alpha9.jar:6.0.0.Alpha9]
at com.example.debugsample.PersonService.getPersonByPersonName(PersonService.java:56) ~[classes/:na]
at com.example.debugsample.PersonController.findPersonByList(PersonController.java:27) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.8.jar:5.3.8]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1063) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.8.jar:5.3.8]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.8.jar:5.3.8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) ~[tomcat-embed-core-9.0.48.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.8.jar:5.3.8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.48.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.48.jar:9.0.48]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.8.jar:5.3.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.8.jar:5.3.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.8.jar:5.3.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.8.jar:5.3.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.8.jar:5.3.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.8.jar:5.3.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

For the “list of parameters”, I fixed a bug in parameter list binding which is in Beta1. The specific bug related to passing a Collection as a parameter when that collection should be treated as a basic-type, but your error might be related.

I’ll try to format your posts above, but atm it is completely unreadable

For the enum issue, could you try Beta1 also? The mapping and resolution of basic types has changed significantly since Alpha9.

@Enumerated should be implied if the attribute is an enum fwiw.

Will try upgrading to Beta1. Aware Beta1 uses jarkarta.persistence.3.0.0. This means that our imports must be changes from

import javax.persistence

to

import jakarta.persistence

Will hibernate 6.0 be backwards compatible to jpa 2.2?

We will at some point release a JPA 2.2 variant as well, but for now this is JPA 3.0 only

May I know when will be JPA 2.2 be supported in Hibernate 6?

As soon as possible :wink: