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.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via atlassian.com by Unknown author

Upgrade to Confluence 3.5.5 or install the patch as explained in the details.

,
via spring.io by Unknown author

Mixed JpaTransactionManager with JTA transaction type in the beans.xml and persistence.xml

Solutions on the web

via GitHub by coolsunchen
, 1 year ago
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
via Stack Overflow by jit
, 1 year ago
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
via Stack Overflow by Unknown author, 2 years ago
Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is
via GitHub by kunalsha
, 6 months ago
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
via syncope-user by Maxim Suprunov, 4 months ago
Error creating bean with name 'entityManagerFactory' defined in "/D:/dev_max/jboss-as-chat-mod/bin/content/syncope.war/WEB-INF/classes/persistenceContextEMFactory.xml": Cannot resolve reference to bean 'dataSource' while setting bean property
via syncope-user by Maxim Suprunov, 1 year ago
Error creating bean with name 'entityManagerFactory' defined in "/D:/dev_max/jboss-as-chat-mod/bin/content/syncope.war/WEB-INF/classes/persistenceContextEMFactory.xml": Cannot resolve reference to bean 'dataSource' while setting bean property
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.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

Users with the same issue

34 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Once, 1 year ago
8 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.