This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Other Application Frameworks and the fly likes java lang NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "java lang NoClassDefFoundError " Watch "java lang NoClassDefFoundError " New topic
Author

java lang NoClassDefFoundError

Kevin Lee
Greenhorn

Joined: Oct 06, 2007
Posts: 4
hi,guys
I downloaded the sourcecode from
http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html
,it's a small project integrates spring2 + struts2 + JPA,
I added those jars needed to the folder /WEB-INF/lib, and deployed to the tomcat5.5.when I started the tomcat,getting follow errors:


It seems that it can't find the class rg.hibernate.ejb.HibernatePersistence,I want to know how to fix it.
thanks a lot
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
It seems, none of your jar files contain this class. Just make sure, you have it.

Cheers.
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 467
The problem is that you don't have org.hibernate.ejb.HibernatePersistenc in your jars. This is included in the hibernate entity manager, that you may have not included in libs. I also believe that you might need the hibernate annotations project as well


Visit my blog: http://jnassef.blogspot.com/
Kevin Lee
Greenhorn

Joined: Oct 06, 2007
Posts: 4
Originally posted by Alaa Nassef:
The problem is that you don't have org.hibernate.ejb.HibernatePersistenc in your jars. This is included in the hibernate entity manager, that you may have not included in libs. I also believe that you might need the hibernate annotations project as well


thank you。you are good.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java lang NoClassDefFoundError