org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'permissionRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory. NoSuchBeanDefinitionException: No bean named 'MyPreoccupationEntityManagerFactory' is defined

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web597

  • via Unknown by Unknown author,
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory. NoSuchBeanDefinitionException: No bean named 'MyPreoccupationEntityManagerFactory' is defined at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:343)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)[tomcat-embed-core-7.0.47.jar:7.0.47] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)[tomcat-embed-core-7.0.47.jar:7.0.47] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[tomcat-embed-core-7.0.47.jar:7.0.47] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)[tomcat-embed-core-7.0.47.jar:7.0.47] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)[tomcat-embed-core-7.0.47.jar:7.0.47] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_71] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_71] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'MyPreoccupationEntityManagerFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:568)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1102)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:278)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:110)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:512)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:494)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:660)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:631)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:159)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:340)[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE] ... 22 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    SteVio1989SteVio1989
    3 times, last one
    magicanmagican
    2 times, last one
    Victor_ITVictor_IT
    Once,
    95 more bugmates