• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPA - NoClassDefFoundError: jpa/County (EmbeddedId)

 
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 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic