Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / October 2004

Tip: Looking for answers? Try searching our database.

Hibernate Configuration: NoClassDefFoundError

Thread view: 
Brian Victor - 08 Oct 2004 22:04 GMT
I'm trying to get Hibernate 2.1 to work on Tomcat/Apache on Windows.  I'm
going through chapter 1 of the docs and hitting some trouble.  I've made
some modifications to the code to try to isolate it:

http://eugeneciurana.com/pastebin/pastebin.php?show=3277

On line 62 I get the following:
java.lang.NoClassDefFoundError
       org.apache.jsp.hibernatetest_jsp._jspService(hibernatetest_jsp.java:61)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

hibarnate2.jar and everything in the hibernate lib directory I have copied over
to my application's lib directory.  HibernateUtil compiles without
error.  Any ideas how I would go about fixing this?

Thanks in advance,

Signature

Brian

Brian Victor - 08 Oct 2004 22:20 GMT
> On line 62 I get the following:
> java.lang.NoClassDefFoundError

To answer my own question right after spending 7 hours on it then
posting...

The problem was in my hibernate.cfg.xml file.  I changed the package
that the Cat class was in, but didn't change it in the hibernate.cfg.xml
file to match.

Signature

Brian



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.