Hibernate 6 Alpha9

Tested the Hibernate 6 Alpha9 and encountered startup errors when configuring the entity manager factory. One of the errors is:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.cache.annotation.ProxyCachingConfiguration’: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.cache.jcache.config.ProxyJCacheConfiguration’: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration’: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘metaDataSourceAdvisor’: Cannot resolve reference to bean ‘methodSecurityMetadataSource’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration’: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘txAdviceInterceptor’: Unsatisfied dependency expressed through field ‘transactionManager’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’ defined in class path resource [com/domain/config/DataBaseConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaTransactionManager]: Factory method ‘transactionManager’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in class path resource [com/domain/config/DataBaseConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: entityManagerFactory] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException

Errors occurs on when executing the code below:
// Code snippets
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {

    LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
    em.setDataSource(getDataSource());
    em.setPackagesToScan(new String[] { "com.domain" });
    JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    em.setJpaVendorAdapter(vendorAdapter);
    em.setJpaProperties(getProperties());
    em.setPersistenceUnitName( "entityManagerFactory" );

    return em;
}

It is working fine on Hibernate 5.4.29.Final. Any resolution on the above issue? Thanks.

The error message you posted here is pretty useless. You omitted the stack trace which is necessary to resolve the problem. Also, AFAIK Hibernate 6.0 is not yet supported by Spring, so it’s probably best to ask these questions in the Spring forums and come back here if you hit a Hibernate problem.