TPTP&TopLink essentials: Entities with composite primary keys don't work? [message #141051] |
Fri, 06 March 2009 07:57  |
Eclipse User |
|
|
|
When I try to start our application in TPTP, I get the following exception
from TopLink:
Exception in thread "main" javax.persistence.PersistenceException:
Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build 41
(03/30/2007))):
oracle.toplink.essentials.exceptions.EntityManagerSetupExcep tion
Exception Description: predeploy for PersistenceUnit [FoobarPU] failed.
Internal Exception: Exception [TOPLINK-7150] (Oracle TopLink Essentials -
2.0 (Build 41 (03/30/2007))):
oracle.toplink.essentials.exceptions.ValidationException
Exception Description: Invalid composite primary key specification. The
names of the primary key fields or properties in the primary key class
[com.xxx.entities.FoobarPK] and those of the entity bean class [class
com.xxx.entities.Foobar] must correspond and their types must be the same.
Also, ensure that you have specified id elements for the corresponding
attributes in XML and/or an @Id on the corresponding fields or properties
of the entity class.
at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSet upImpl.predeploy(EntityManagerSetupImpl.java:615)
at
oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitial izer.callPredeploy(JavaSECMPInitializer.java:146)
at
oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitial izer.initPersistenceUnits(JavaSECMPInitializer.java:226)
at
oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitial izer.initialize(JavaSECMPInitializer.java:242)
at
oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitial izer.initializeFromMain(JavaSECMPInitializer.java:278)
at
oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitial izer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)
at
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvi der.createEntityManagerFactory(EntityManagerFactoryProvider. java:119)
at
javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:83)
at com.xxx.createEntityManagerFactory(xxx.java:225)
at com.xxx.Run.main(xxx.java:50)
Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0
(Build 41 (03/30/2007))):
oracle.toplink.essentials.exceptions.EntityManagerSetupExcep tion
TopLink gives this exception for all our entities which use composite
primary keys. However, the application runs fine without TPTP, and also
using Eclipse's debugger.
If I use EclipseLink 1.0.1 libraries the application also works with TPTP,
however we have to use older Toplink libraries.
Do you have any ideas what could cause this incompatibility?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03033 seconds