Skip to content

Instantly share code, notes, and snippets.

@tuhin47
Created March 6, 2022 04:05
Show Gist options
  • Save tuhin47/e15452ce2037b061916f3260a584d493 to your computer and use it in GitHub Desktop.
Save tuhin47/e15452ce2037b061916f3260a584d493 to your computer and use it in GitHub Desktop.
Upgrade Java from 8 to 11 or higher

Error thrown as :

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory

Solution

<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
<dependency>
    <groupId>org.javassist</groupId>
    <artifactId>javassist</artifactId>
    <version>3.25.0-GA</version>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment