org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemEntityManagerFactory' defined in com.example.infra.SystemHibernateConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No persistence unit with name 'system' found

GitHub | hho | 5 months ago
  1. 0

    Document @EntityScan changed in upgrade guide

    GitHub | 5 months ago | hho
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemEntityManagerFactory' defined in com.example.infra.SystemHibernateConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No persistence unit with name 'system' found
  2. 0

    Spring - migrate from DAO-Service architecture to JPA

    Stack Overflow | 2 years ago | martin
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No PersistenceProvider specified in EntityManagerFactory configuration, and chosen PersistenceUnitInfo does not specify a provider class name either
  3. 0

    Maven, JSF 2, Spring e Hibernate - Revista Java Magazine 101

    com.br | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'atletaService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.javamagazine.onzevencedor.dao.AtletaDAO br.com.javamagazine.onzevencedor.service.AtletaService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'atletaDao': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [C:\ABELEM\Java\workspace\OnzeVencedor\src\main\webapp\WEB-INF\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No persistence unit with name 'onzeVencedorPu' found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    spring error :org.springframework.web.context.ContextLoader - Context initialization failed

    Stack Overflow | 1 year ago | user3276342
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/C:/Users/asus/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/stage/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No persistence unit with name 'persistance_unit' found
  6. 0

    Problem with LAB-4941: Spring Database Access

    Google Groups | 2 years ago | Karl Fischer W.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [spring/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No persistence unit with name 'default' found

  1. MrMonkey 1 times, last 8 months ago
2 unregistered visitors
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.lang.IllegalArgumentException

    No persistence unit with name 'system' found

    at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.obtainPersistenceUnitInfo()
  2. Spring ORM
    AbstractEntityManagerFactoryBean.afterPropertiesSet
    1. org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.obtainPersistenceUnitInfo(DefaultPersistenceUnitManager.java:697)[spring-orm-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.determinePersistenceUnitInfo(LocalContainerEntityManagerFactoryBean.java:357)[spring-orm-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:314)[spring-orm-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    4. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:373)[spring-orm-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    5. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:362)[spring-orm-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    5 frames
  3. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    8 frames
  4. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076)[spring-context-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:851)[spring-context-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3 frames
  5. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RC1.jar:1.4.0.RC1]
    2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RC1.jar:1.4.0.RC1]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RC1.jar:1.4.0.RC1]
    3 frames
  6. org.springframework.boot
    SpringBootContextLoader.loadContext
    1. org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:111)[spring-boot-test-1.4.0.RC1.jar:1.4.0.RC1]
    1 frame
  7. org.springframework.test
    DefaultCacheAwareContextLoaderDelegate.loadContext
    1. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2 frames
  8. Spring TestContext
    DependencyInjectionTestExecutionListener.prepareTestInstance
    1. org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3 frames
  9. org.springframework.boot
    AutoConfigureReportTestExecutionListener.prepareTestInstance
    1. org.springframework.boot.test.autoconfigure.AutoConfigureReportTestExecutionListener.prepareTestInstance(AutoConfigureReportTestExecutionListener.java:46)[spring-boot-test-autoconfigure-1.4.0.RC1.jar:1.4.0.RC1]
    1 frame
  10. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3 frames
  11. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)[junit-4.12.jar:4.12]
    1 frame
  12. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    3 frames
  13. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[junit-4.12.jar:4.12]
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[junit-4.12.jar:4.12]
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[junit-4.12.jar:4.12]
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[junit-4.12.jar:4.12]
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[junit-4.12.jar:4.12]
    5 frames
  14. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    2 frames
  15. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)[junit-4.12.jar:4.12]
    1 frame
  16. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)[spring-test-4.3.1.RELEASE.jar:4.3.1.RELEASE]
    1 frame
  17. JUnit4 Provider
    JUnit4Provider.invoke
    1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)[surefire-junit4-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)[surefire-junit4-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)[surefire-junit4-2.18.1.jar:2.18.1]
    4. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)[surefire-junit4-2.18.1.jar:2.18.1]
    4 frames
  18. SureFire
    ForkedBooter.main
    1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)[surefire-booter-2.18.1.jar:2.18.1]
    2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)[surefire-booter-2.18.1.jar:2.18.1]
    3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)[surefire-booter-2.18.1.jar:2.18.1]
    3 frames