I posted this problem on openjpa forum: Please see this thread at: http://n2.nabble.com/Problem-with-multi-persistence-units-td2303818.html#a2304438
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 Hi, 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.MetaDataFactory: jpa(Files=/usr/local/geronimo- tomcat6-javaee5-2.1.3/repository/default/callingcard-ear/1.0/callingcard-ear-1.0.car/callingcard-ejb.jar) 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 [1]. 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. You can see in the trace that DigitalkUser and DigitalkAccount are being processed since they exist in the jar file specified in the MetaDataFactory property: 124910 CallingCardUsersUnit TRACE [ejbd 1] openjpa.MetaData - Scan of "/usr/local/geronimo-tomcat6- javaee5-2.1.3/repository/default/callingcard-ear/1.0/callingcard-ear-1.0.car/callingcard-ejb.jar" found persistent types [com.nuvoip.services.ipcalls.model.entity.subscribers.DigitalkAccount]. Bottom line, you need to determine how those properties are being passed into OpenJPA. We're just doing what's being requested... :-) Good luck, Kevin [1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_meta_factory ----- B Amigo:super: -- View this message in context: http://www.nabble.com/OpenJPA-problems-with-multi-persistence.xml-tp21969527s134p21969527.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.