Bootstrap failed with hibernate 6.3.0.Final

I am trying to setup hibernate latest version with spring boot with latest(3.2.0-SNAPSHOT) available. While creating entityManagerFactory, below exception is thrown. The same code works fine with hibernate version (6.2.8.Final)


Caused by: java.lang.NullPointerException: Cannot invoke "org.hibernate.boot.spi.MetadataImplementor.getEntityBindings()" because "this.metadata" is null
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:350) ~[hibernate-core-6.3.0.Final.jar:6.3.0.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:193) ~[hibernate-core-6.3.0.Final.jar:6.3.0.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:63) ~[spring-orm-6.1.0-M4.jar:6.1.0-M4]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) ~[spring-orm-6.1.0-M4.jar:6.1.0-M4]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-6.1.0-M4.jar:6.1.0-M4]

This is a known bug and will be fixed in the next version: HHH-17154 Fix NullPointerException is thrown when constructing EntityManagerFactoryBuilderImpl by beikov · Pull Request #7264 · hibernate/hibernate-orm · GitHub

2 Likes

Thanks @beikov . Is the new version (6.3.1) available somewhere to check?

You can test the 6.3.1-SNAPSHOT version. Use this maven repository:

    <repository>
      <id>maven-snapshots</id>
      <url>http://oss.sonatype.org/content/repositories/snapshots</url>
      <layout>default</layout>
        <releases>
          <enabled>false</enabled>
        </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
1 Like

The snapshot version did the magic when will 6.3.1 released any ETA on that?

Just follow our blog (https://in.relation.to/) and our X account (https://x.com/Hibernate) to get updates on when Hibernate 6.3.1 release.