org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Cannot resolve reference to bean 'blPersistenceUnitManager' while setting bean property 'persistenceUnitManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blPersistenceUnitManager' defined in resource loaded from byte array: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.IllegalStateException: The classes [org.broadleafcommerce.core.catalog.domain.ProductImpl, com.mycompany.sample.integration.MyProductImpl] are managed classes within the MergePersistenceUnitManager but were not detected as being transformed by the EntityMarkerClassTransformer. These classes are likely loaded earlier in the application startup lifecyle by the servlet container. Verify that an empty <absolute-ordering /> element is contained in your web.xml to disable scanning for ServletContainerInitializer classes by your servlet container which can trigger early class loading. If the problem persists, ensure that there are no bean references to your entity class anywhere else in your Spring applicationContext and consult the documentation for your servlet container to determine if classes are loaded prior to the Spring context initialization. Also, it is a necessity that '-javaagent:/path/to/spring-instrument-4.1.5.jar' be added to the JVM args of the server. Finally, ensure that Session Persistence is also disabled by your Servlet Container. To do this in Tomcat, add <Manager pathname="" /> inside of the <Context> element in context.xml in your app's META-INF folder or your server's conf folder.

GitHub | coolsunchen | 8 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd and rp . Or join the community to write better ones.
  1. 0
    samebug tip
    Spring Security detects beans in the root context. Move the detection of the bean (or declare it explictly) in the root context.
  2. 0
    samebug tip
    Your entity is not a valid Entity class.
  3. 0
    samebug tip
    Upgrade to Confluence 3.5.5 or install the patch as explained in the details.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Mixed JpaTransactionManager with JTA transaction type in the beans.xml and persistence.xml
    via spring.io
  6. 0

    extends productImpl throw exception

    GitHub | 8 months ago | coolsunchen
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Cannot resolve reference to bean 'blPersistenceUnitManager' while setting bean property 'persistenceUnitManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blPersistenceUnitManager' defined in resource loaded from byte array: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.IllegalStateException: The classes [org.broadleafcommerce.core.catalog.domain.ProductImpl, com.mycompany.sample.integration.MyProductImpl] are managed classes within the MergePersistenceUnitManager but were not detected as being transformed by the EntityMarkerClassTransformer. These classes are likely loaded earlier in the application startup lifecyle by the servlet container. Verify that an empty <absolute-ordering /> element is contained in your web.xml to disable scanning for ServletContainerInitializer classes by your servlet container which can trigger early class loading. If the problem persists, ensure that there are no bean references to your entity class anywhere else in your Spring applicationContext and consult the documentation for your servlet container to determine if classes are loaded prior to the Spring context initialization. Also, it is a necessity that '-javaagent:/path/to/spring-instrument-4.1.5.jar' be added to the JVM args of the server. Finally, ensure that Session Persistence is also disabled by your Servlet Container. To do this in Tomcat, add <Manager pathname="" /> inside of the <Context> element in context.xml in your app's META-INF folder or your server's conf folder.

  1. esaar 2 times, last 7 months ago
  2. abrazeneb 34 times, last 6 months ago
  3. Piz 9 times, last 7 months ago
  4. haerick 4 times, last 8 months ago
  5. Andreas Häber 8 times, last 9 months ago
3 more registered users
7 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. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'blPersistenceUnitManager' defined in resource loaded from byte array: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.IllegalStateException: The classes [org.broadleafcommerce.core.catalog.domain.ProductImpl, com.mycompany.sample.integration.MyProductImpl] are managed classes # **within the MergePersistenceUnitManager but were not detected as being transformed by the EntityMarkerClassTransformer.** These classes are likely loaded earlier in the application startup lifecyle by the servlet container. Verify that an empty <absolute-ordering /> element is contained in your web.xml to disable scanning for ServletContainerInitializer classes by your servlet container which can trigger early class loading. If the problem persists, ensure that there are no bean references to your entity class anywhere else in your Spring applicationContext and consult the documentation for your servlet container to determine if classes are loaded prior to the Spring context initialization. Also, it is a necessity that '-javaagent:/path/to/spring-instrument-4.1.5.jar' be added to the JVM args of the server. Finally, ensure that Session Persistence is also disabled by your Servlet Container. To do this in Tomcat, add <Manager pathname="" /> inside of the <Context> element in context.xml in your app's META-INF folder or your server's conf folder.

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean()
  2. Spring Beans
    BeanDefinitionValueResolver.resolveReference
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    4. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    5. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    8. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    8 frames