• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JPA  RSS feed

Ranch Hand
Posts: 222
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Netbeans 7 on Win Server 2008 R2. I'm building a sample JPA application, following the book entitled Java EE6 Development with Netbeans 7 by Heffelfinger.

From chapter 6 I follow the book's instructions, using the NB wizards to create entity classes, entities from the Database tables and finally the JSP pages to perform the CRUD operations. When running the application I get:

Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException

Exception Description: Predeployment of PersistenceUnit [jpawebPU] failed.

Internal Exception: Exception [EclipseLink-7220] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ValidationException

Exception Description: The @JoinColumns on the annotated element [field customerId] from the entity class [class com.manaar.entities.Telephone] 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 referencedColumnName elements must be specified in each such @JoinColumn.. Please see server.log for more details.

C:\jsfapplications\jpaweb\nbproject\build-impl.xml:1046: The module has not been deployed.

The database creation script (using the Java DB):

The annotated element class is as follows. I modified the orginially generated class to capture both the composite and main primary key in the source entity (Customer.java), but this still didn't fix the problem. I would appreciate any advice about this error and how to resolve it. Thanks in advance, J!

Posts: 19668
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing specific to JSF here, so I'm moving it to the ORM forum.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!