On Feb 11, 2009, at 10:55 PM, bongosdude wrote:

I posted this problem on openjpa forum: Please see this thread at:


One of OpenJPA developer replied to my post and pointed out some problem
that may be caused by how geronimo configures openjpa. I copied his reply
here and hope someone from geronimo developers can comment

It looks like Geronimo might be passing in some extra properties to
OpenJPA???  In the trace, there are two openjpa properties that are
suspect.  You don't have them in your persistence.xml.  And, if you are not
passing them in as system properties, then my next guess is Geronimo.  The
two properties that seem to be causing your situation are these:


openjpa.jdbc.SynchronizeMappings: buildSchema(ForeignKeys=true)

The first one (MetaDataFactory) specifies which persistence types to
process.  Since a jar file is specified, we will search the jar file for any
persistence types (regardless of whether they are listed in a
persistence.xml file or not).  Our documentation explains this a bit more

I don't know where the MetatDataFactory setting is coming from... I can't find anywhere where it is set by either Geronimo/OpenEJB. Maybe I'm not looking in the right places.

The next property (SynchronizeMappings) is what I was referring to in
earlier e-mails.  This is the property that tells OpenJPA to please create
the tables if they do not exist.

Yes, that's our default setting for SynchronizeMappings. See var/config/config.xml

You can override by adding the following property in your persistence.xml

<property name="openjpa.jdbc.SynchronizeMappings" value="false" />