Hi, Glassfish ships with EclipseLink (another JPA provider) by default. If you are attempting to use an alternate JPA provider (ie. OpenJPA), then have you properly disabled or overloaded the EclipseLink impl with the OpenJPA impl?
Kevin 2012/1/26 Francesco Chicchiriccò <[email protected]> > Hi all, > I am trying to deploy my openjpa-based webapp to Glassfish 3.1.1 > > A bare deploy of the same WAR working with Tomcat 7 simply fails. > > What I've done so far: > > 1. added WEB-INF/glassfish-web.xml like as follows: > > <glassfish-web-app> > <context-root>/syncope</context-root> > <resource-ref> > <res-ref-name>jdbc/syncopeDataSource</res-ref-name> > <jndi-name>jdbc/syncopeDataSource</jndi-name> > </resource-ref> > <class-loader delegate="false"/> > </glassfish-web-app> > > The relevant stuff here is the delegating class-loader stuff, needed for > letting Spring do its job. > > 2. added a property in persistence.xml in order to avoid to trigger > EclipseLink's weaver, embedded in Glassfish (I am using build-time > enhancement via openjpa-maven.plugin): > > <property name="eclipselink.weaving" value="false"/> > > > With the settings above, many things in the application seem to work: > unfortunately, when it comes to merge an entity, the following error is > thrown: > > java.lang.StackOverflowError > at > > org.apache.openjpa.kernel.TransferFieldManager.storeObjectField(TransferFieldManager.java:115) > at > > org.apache.openjpa.kernel.StateManagerImpl.providedObjectField(StateManagerImpl.java:2166) > at > > org.syncope.core.persistence.beans.SchemaMapping.pcProvideField(SchemaMapping.java) > at > > org.apache.openjpa.kernel.StateManagerImpl.provideField(StateManagerImpl.java:3163) > at > > org.apache.openjpa.kernel.StateManagerImpl.fetchObjectField(StateManagerImpl.java:2392) > at > > org.apache.openjpa.kernel.StateManagerImpl.fetchField(StateManagerImpl.java:872) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedField(OpenJPAPersistenceUtil.java:200) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoaded(OpenJPAPersistenceUtil.java:161) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedArray(OpenJPAPersistenceUtil.java:265) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedCollection(OpenJPAPersistenceUtil.java:242) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedField(OpenJPAPersistenceUtil.java:212) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoaded(OpenJPAPersistenceUtil.java:161) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedArray(OpenJPAPersistenceUtil.java:265) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedCollection(OpenJPAPersistenceUtil.java:242) > at > > org.apache.openjpa.persistence.OpenJPAPersistenceUtil.isLoadedField(OpenJPAPersistenceUtil.java:212) > ... > > Any hint? > > TIA. > Regards. > > -- > Francesco Chicchiriccò > > Apache Cocoon Committer and PMC Member > http://people.apache.org/~ilgrosso/ > >
