Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338737

Summary: JPA validation issue An ancestor of this class has already defined the primary key
Product: [WebTools] Dali JPA Tools Reporter: Edwin Chan <edwinc>
Component: GeneralAssignee: dali.general-inbox <dali.general-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: neil.hauge
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
PI file none

Description Edwin Chan CLA 2011-03-02 16:37:59 EST
Build Identifier: Eclipse 3.6.2

- Import PI into our adopter product (based on Eclipse 3.6.2) and build it.
- Following error msgs showed up in the problems view:


An ancestor of this class has already defined the primary key. Primary key attributes may not be defined here.    Productresources.java    /DynamicOrderFulfillmentDBAccess/src/com/ibm/websphere/icp/telecom/reference/dynamicorderfulfillment    line 24    Validation Message

This class has a composite primary key.  It must use an ID class.    Productresources.java    /DynamicOrderFulfillmentDBAccess/src/com/ibm/websphere/icp/telecom/reference/dynamicorderfulfillment    line 22    Validation Message

The application built fine in Eclipse 3.4.2
There is no related error msgs in the .log file


Reproducible: Always

Steps to Reproduce:
1.Import PI into our adopter product (based on Eclipse 3.6.2) and build it.
2. Following error msgs showed up in the problems view:
3.
Comment 1 Edwin Chan CLA 2011-03-02 16:40:01 EST
Created attachment 190208 [details]
PI file

PI file
Comment 2 Neil Hauge CLA 2011-03-02 16:48:43 EST
This would appear to be a duplicate of bug 335709?
Comment 3 Edwin Chan CLA 2011-03-02 16:55:38 EST
yes, somehow bugzilla didn't catch this when providing the traceback, perhaps because the filename is different.

*** This bug has been marked as a duplicate of bug 335709 ***
Comment 4 Neil Hauge CLA 2011-03-02 17:03:28 EST
Also, be sure to read comment 4 on bug 335709.  The "Ancestor..." error you are receiving in this case is meant to be there in the Generic Dali platform.  If you are using a platform that extends the Generic platform, you might get this error, but the fix will be in the non-Generic platform that you are using, not in Dali.  

Bug 335709 is open due to another validation issue that is similar but not related.

To summarize, for this particular issue, you probably need to file a bug against the adopter product.