• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA - NoClassDefFoundError: jpa/County (EmbeddedId)  RSS feed

 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am coming across a NoClassDefFoundError: jpa/County below when trying to instantiate a JPA with EmbeddedId:

02/05/2010 10:45:48 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
java.lang.NoClassDefFoundError: jpa/County
at client.addCounties(addCounties.java:8)
The following are the relevant code snippets:

Can someone please provide advice on how to properly instantiate County entity without getting NoClassDefFoundError: jpa/County? I have tried all combinations between line 1 – 7 without success.

I am using JDK1.6.0_23, GF2.1 on Windows 7.

Thanks in advance,

Jack
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a NoClassDefFoundError, which suggests the classpath is wrong.
 
Jack Bush
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Thank you for offerring advice to this threat.

I managed to re-create the whole Java EE 5 project from scratch and can confirm that County is part of CountyConsumer-ejb has been included in the CLASSPATH of CountyConsumer-app-client but it did not make any difference. Below is the CLASSPATH segment of CountyConsumer-app-client in nbproject/project.properties (Netbeans 6.9.1):


I am wondering whether this lost of access/visibility of County from client.AddCounties() is due to the fact that it is an Application Client which is in a different container? Also find it strange to see the names of 2 old packages (domain, ejb) already been deleted and could not find them in any of the codes or configuration files.

Any suggestion?

Thanks,

Jack
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!