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: Unable to resolve persistence unit root URL

GitHub | wilkinsona | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 6314#230228731

    GitHub | 8 months ago | wilkinsona
    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: Unable to resolve persistence unit root URL
  2. 0

    PersistenceException: Unable to resolve persistence unit root URL

    GitHub | 7 months ago | ofbizbrazil
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEntityManagerFactory' defined in class path resource [com/repo/data/MyRepositoryConfig.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Unable to resolve persistence unit root URL
  3. 0

    Spring Boot 1.4 : class path resource [] cannot be resolved to URL because it does not exist

    GitHub | 6 months ago | andrashatvani
    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: Unable to resolve persistence unit root URL
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Boot 1.4 : class path resource [] cannot be resolved to URL because it does not exist

    Stack Overflow | 7 months ago | Andras Hatvani
    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: Unable to resolve persistence unit root URL
  6. 0

    spring boot application startup failed with two datasources

    Stack Overflow | 6 months ago | brain storm
    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: Unable to resolve persistence unit root URL
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    class path resource [] cannot be resolved to URL because it does not exist

    at org.springframework.core.io.ClassPathResource.getURL()
  2. Spring Core
    ClassPathResource.getURL
    1. org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)[spring-core-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    1 frame
  3. Spring ORM
    AbstractEntityManagerFactoryBean.afterPropertiesSet
    1. org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.determineDefaultPersistenceUnitRootUrl(DefaultPersistenceUnitManager.java:600)[spring-orm-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    2. org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.preparePersistenceUnitInfos(DefaultPersistenceUnitManager.java:443)[spring-orm-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    3. org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.afterPropertiesSet(DefaultPersistenceUnitManager.java:424)[spring-orm-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    4. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:310)[spring-orm-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    5. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:373)[spring-orm-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    6. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:362)[spring-orm-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    6 frames
  4. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    8 frames
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076)[spring-context-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:851)[spring-context-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.1.BUILD-SNAPSHOT.jar!/:4.3.1.BUILD-SNAPSHOT]
    3 frames
  6. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar!/:1.4.0.BUILD-SNAPSHOT]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar!/:1.4.0.BUILD-SNAPSHOT]
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar!/:1.4.0.BUILD-SNAPSHOT]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar!/:1.4.0.BUILD-SNAPSHOT]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar!/:1.4.0.BUILD-SNAPSHOT]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.BUILD-SNAPSHOT.jar!/:1.4.0.BUILD-SNAPSHOT]
    6 frames
  7. bootstrap
    Application.main
    1. bootstrap.Application.main(Application.java:14)[classes!/:0.0.1-SNAPSHOT]
    1 frame
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_74]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_74]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_74]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_74]
    4 frames
  9. Spring Boot Loader
    JarLauncher.main
    1. org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)[spring-boot-example-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
    2. org.springframework.boot.loader.Launcher.launch(Launcher.java:87)[spring-boot-example-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
    3. org.springframework.boot.loader.Launcher.launch(Launcher.java:50)[spring-boot-example-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
    4. org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)[spring-boot-example-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
    4 frames