Page 1 of 1

Entity Extension Issue

Posted: Tue Jan 06, 2015 5:40 am
by srinig
This is the error I am getting when I am trying to implement the sample Entity extension functionality.

java.lang.IllegalStateException: The classes|[org.broadleafcommerce.core.order.domain.OrderImpl, com.mycompany.order.domain.MyOrderImpl]|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.

Can someone help me with what I am doing wrong here. I followed the instructions exactly as per the site recommendations.

Re: Entity Extension Issue

Posted: Wed Jan 07, 2015 1:41 am
by phillipuniverse
What version of Tomcat are you using? That log message tells you exactly what you need to do. Is there a part of that that is not clear? If so, I would like to revise the message to be more straightforward.

Re: Entity Extension Issue

Posted: Wed Jan 07, 2015 1:42 am
by phillipuniverse
FYI, pretty positive that you are running into this issue: https://github.com/BroadleafCommerce/Br ... ssues/1171

Re: Entity Extension Issue

Posted: Mon Sep 14, 2015 7:01 am
by Shree
I have swithched to Broadleaf 4.0.0
I am trying to implement the sample Entity extension functionality to use RowSecurityProvider

This is what i am getting...

java.lang.IllegalStateException: The classes
[artifact:mvn] [com.mycompany.core.adminuser.domain.MyAdminUser, org.broadleafcommerce.openadmin.server.security.domain.AdminUserImpl]
[artifact:mvn] are managed classes within the MergePersistenceUnitManager
[artifact:mvn] but were not detected as being transformed by the EntityMarkerClassTransformer. These
[artifact:mvn] classes are likely loaded earlier in the application startup lifecyle by the servlet
[artifact:mvn] container. Verify that an empty <absolute-ordering /> element is contained in your
[artifact:mvn] web.xml to disable scanning for ServletContainerInitializer classes by your servlet
[artifact:mvn] container which can trigger early class loading. If the problem persists, ensure that
[artifact:mvn] there are no bean references to your entity class anywhere else in your Spring applicationContext
[artifact:mvn] and consult the documentation for your servlet container to determine if classes are loaded
[artifact:mvn] prior to the Spring context initialization. Also, it is a necessity that
[artifact:mvn] '-javaagent:/path/to/spring-instrument-4.1.5.jar' be added to the JVM args of the server.
[artifact:mvn] Finally, ensure that Session Persistence is also disabled by your Servlet Container.
[artifact:mvn] To do this in Tomcat, add <Manager pathname="" /> inside of the <Context> element
[artifact:mvn] in context.xml in your app's META-INF folder or your server's conf folder.
[artifact:mvn] at org.broadleafcommerce.common.extensibility.jpa.MergePersistenceUnitManager.preparePersistenceUnitInfos(MergePersistenceUnitManager.java:285)
[artifact:mvn] at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.afterPropertiesSet(DefaultPersistenceUnitManager.java:424)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
[artifact:mvn] ... 32 more

Re: Entity Extension Issue

Posted: Tue Sep 15, 2015 8:34 am
by phillipuniverse
Where else did you reference these classes? It looks like you might have referenced them in an applicationContext.xml file that wasn't applicationContext-entity.xml. The naming of this file is very important.