openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <ilgro...@apache.org>
Subject OpenJPA 2.2.0-SNAPSHOT & Glassfish 3.1.1
Date Thu, 26 Jan 2012 15:49:21 GMT
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/


Mime
View raw message