| Author |
JPA - NoClassDefFoundError: jpa/County (EmbeddedId)
|
Jack Bush
Ranch Hand
Joined: Oct 20, 2006
Posts: 235
|
|
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
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
This is a NoClassDefFoundError, which suggests the classpath is wrong.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Jack Bush
Ranch Hand
Joined: Oct 20, 2006
Posts: 235
|
|
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
|
 |
 |
|
|
subject: JPA - NoClassDefFoundError: jpa/County (EmbeddedId)
|
|
|