-->
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.  [ 4 posts ] 
Author Message
 Post subject: java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader
PostPosted: Thu Nov 03, 2005 7:23 am 
Beginner
Beginner

Joined: Thu Aug 04, 2005 2:24 pm
Posts: 45
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3

Mapping documents:

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

Full stack trace of any exception that occurs:
java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader at org.hibernate.util.XMLHelper.createSAXReader(XMLHelper.java:35) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168) at org.hibernate.cfg.Configuration.configure(Configuration.java:1112) at com.MDSI.MAXIMUMFactory.Hibernate.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:48) at _jsp._index._jspService(index.jsp:43) [/jsp/index.jsp] at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)


Name and version of the database you are using: Oracle 9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

Hello, all i'm trying to do is open and close a session, but the above exception is being thrown right at this line:

Code:
cfg.configure(CONFIG_FILE_LOCATION);


This line is my by Session Factory class and the value of the macro is:
Code:
private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";


It seems to me that the Session Factory for some reason is not finding my configuration file, which i don't understand why, once it's located right under the src folder, where all the subsequent packages are.

Thanks a lot
Eduardo[/code]

_________________
Eduardo Mylonas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 7:26 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
No. It's not finding the dom4j jar file which is needed for XML parsing.

Check the documentation to see the required files which must be on the classpath.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 7:54 am 
Beginner
Beginner

Joined: Thu Aug 04, 2005 2:24 pm
Posts: 45
jamie_dainton wrote:
No. It's not finding the dom4j jar file which is needed for XML parsing.

Check the documentation to see the required files which must be on the classpath.


You were right.

Well, it wasn't finding the dom.jar, but not because it wasn't there, but because i wasn't telling jdeveloper to use that file in the classpath.

Thanks a lot
Eduardo

_________________
Eduardo Mylonas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 7:57 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
Credit as useful please.


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