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.  [ 10 posts ] 
Author Message
 Post subject: Hibernate and DOM4J's SAXReader
PostPosted: Wed Feb 04, 2004 4:59 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 2:42 pm
Posts: 24
Hey I have an installation that I have configured to use hibernate but I am having what I believe to be a configuration issue. When I run tomcat the logs reflect a ClassNotFoundException within hibernate when attempting to utilize org/dom4j/io/SAXReader in the XMLHelper class. in other words I get this output:

java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader
at net.sf.hibernate.util.XMLHelper.createSAXReader(XMLHelper.java:15)

I have tried everything and no change in configuration seems to trick hibernate into working. There is a dom4j in the class path and I can use Dom4j objects in my code freely. So has anyone ever encountered this before?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 5:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Probably a wrong jar version? Are you using the one distributed with hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 5:14 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 2:42 pm
Posts: 24
Yes, that was one of my first attempts at a solution. I am using hibernate 2.0.2 and dare not go above that as that is the version on which the project is built. I have also looked at the DOM4J jar I have and SAXReader is indeed there where it should be.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 5:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
very strange ... and you can access other classes in the jar from your code?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 5:49 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 2:42 pm
Posts: 24
Yes, my code can address everything normally. It just seems that the hibernate jar itself cannot see the dom4j. I have tried everything short of fusing the two jars into one to make it understand.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 5:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Where have you put the libs? Try putting everything into WEB-INF/lib except database driver jars ...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 6:10 pm 
Beginner
Beginner

Joined: Thu Jan 22, 2004 2:42 pm
Posts: 24
I just tried that advice, it still throws the same exception. I wish I could say it gave me more hints but I have no new information about it really.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 6:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well I am really running out of jdeas, too ... you will have to experiment, try moving the jars to differnet tomcat library folders, use a different version at least for testing ...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 8:05 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Strange, be sure to use the lastest version of your Tomcat family

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 11:34 am 
Beginner
Beginner

Joined: Thu Jan 22, 2004 2:42 pm
Posts: 24
thanks for all your help guys, the final resolution was the while it was in my classpath, dom4j.jar was not physically present in the same directory with hibernate2.jar. Silly, but that was the cause.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.