-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: very frustrated. very simple problem. i am stupid.
PostPosted: Fri Oct 08, 2004 9:30 am 
Newbie

Joined: Fri Oct 08, 2004 9:26 am
Posts: 17
Hibernate version:

version 2

Mapping documents:

<class name="discussion.User" table="users">
<id name="ID"
column="id"
type="string">
<generator class="assigned"></generator>
</id>

<property name="password" column="password" type="string" />
</class>

Code between sessionFactory.openSession() and session.close():

List l = woo.find("from users as User");

Full stack trace of any exception that occurs:

java.lang.NoClassDefFoundError: net/sf/hibernate/UnresolvableObjectException
org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:192)
org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:203)
org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:154)
org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:177)
org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:326)
model.DAO.load(DAO.java:26)
fuse.gallery.handleRequest(gallery.java:81)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:29)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:378)
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:313)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:289)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Name and version of the database you are using:

mysql
4.0.17


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 9:45 am 
Beginner
Beginner

Joined: Fri Aug 06, 2004 9:01 am
Posts: 21
Looks like your main problem per the "java.lang.NoClassDefFoundError" is that you don't have the Hibernate JAR in your classpath.

Fix that first and then move on.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 10:01 am 
Newbie

Joined: Fri Oct 08, 2004 9:26 am
Posts: 17
AviD wrote:
Looks like your main problem per the "java.lang.NoClassDefFoundError" is that you don't have the Hibernate JAR in your classpath.

Fix that first and then move on.


i think hibernate is on the class path? if you do something like

User k = new User();
k.passsword = "eggs";
k.id = "peter";
woo.save(k);

it works fine, when you go look at the datebase you see a row called peter with said password?

but when you do a find you get that horrible error.

i don't understand!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 11:24 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you have a version mistake between spring and hibernate

download spring and depencies (this should include hibernate2.jar) and don't download another version of hibernate

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 1:03 pm 
Newbie

Joined: Fri Oct 08, 2004 9:26 am
Posts: 17
anthony wrote:
you have a version mistake between spring and hibernate

download spring and depencies (this should include hibernate2.jar) and don't download another version of hibernate



you are right! thank you very much! I feel much better now!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.