• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Need help to correct @JoinColumn mapping in entity class with composite keys

 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am no longer able to deploy the Customer (OneToMany Unidirectional) entity class/bean after having setup composite primary key (@IdClass) as follows:


Below is the application client output:

Deploying application in domain failed; Deployment ErrorException [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [TravelAgentDB-PU] failed.
Internal Exception: Exception [TOPLINK-7220] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The @JoinColumns on the annotated element [private java.util.Collection domain.Customer.hobbies] from the entity class [class domain.Customer] is incomplete. When the source entity class uses a composite primary key, a @JoinColumn must be specified for each join column using the @JoinColumns. Both the name and the referenceColumnName elements must be specified in each such @JoinColumn. -- Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException

I am running JDK 1.6.0_12, Glassfish v2.1 and Netbeans 6.5.1 on Windows XP platform.

I would appreciate if anyone could assist with completing the @JoinColumn and referenceColumnName since I am little baffled with JPA schema mapping still.

This question was posted at http://forums.sun.com/thread.jspa?threadID=5398528&tstart=0 but have not received any feedback so far.

Thanks in advance,

Jack
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic