Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » TPTP&TopLink essentials: Entities with composite primary keys don't work?
TPTP&TopLink essentials: Entities with composite primary keys don't work? [message #141051] Fri, 06 March 2009 07:57 Go to next message
Torben Putkonen is currently offline Torben Putkonen
Messages: 34
Registered: July 2009
Member
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?
Re: TPTP&TopLink essentials: Entities with composite primary keys don't work? [message #141062 is a reply to message #141051] Fri, 06 March 2009 10:51 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene Chan
Messages: 287
Registered: July 2009
Senior Member
Hi Pasi,

Which JVM are you using? (java.exe -version)
Please note neither Oracle JVM nor JRocket is tested and supported by TPTP.

Eugene

"Pasi Kovanen" <Pasi.Kovanen@iki.fi> wrote in message
news:57f09fba8be47f3896617e9e6dc99fbb$1@www.eclipse.org...
> 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?
>
Re: TPTP&TopLink essentials: Entities with composite primary keys don't work? [message #141095 is a reply to message #141062] Mon, 09 March 2009 03:26 Go to previous message
Torben Putkonen is currently offline Torben Putkonen
Messages: 34
Registered: July 2009
Member
I have tested with JVMs:

java version "1.5.0_17"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
Java HotSpot(TM) Client VM (build 1.5.0_17-b04, mixed mode, sharing)

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Previous Topic:Unable to install TPTP Profiling on a new Eclipse 3.4.2 installation.
Next Topic:IWAT0005E The host localhost was not found.?
Goto Forum:
  


Current Time: Fri Jul 25 07:35:39 EDT 2014

Powered by FUDForum. Page generated in 0.01831 seconds