-->
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.  [ 8 posts ] 
Author Message
 Post subject: java.lang.NoClassDefFoundError: org/dom4j/Attribute
PostPosted: Thu Jul 15, 2004 3:36 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
Help!
I'm using Tomcat and try to use Hibernate.
I've got this error:

java.lang.NoClassDefFoundError: org/dom4j/Attribute

For the first I copied my JDBS-Driver to TOMCAT/common/lib, then
I copied dom4J.jar and hibernate-2.1.jar (and some other jars listed in Hibernate Doc ) to WEB-INF/lib Directory of my Eclipse-Project. So both global and context Classpaths schould be set... But something is wrong, and Ican't find it.

Please help!!!!
Lena


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 3:48 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
Hi, lesha!

Read this chapter 1. Quickstart with Tomcat
http://www.hibernate.org/hib_docs/reference/en/html/quickstart.html

--
Leonid


Top
 Profile  
 
 Post subject: Doesen't help...
PostPosted: Thu Jul 15, 2004 4:33 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
I've read it five times. My Server.xml-File contains the Project-Context and JDBC-Ressources definition. Hibernate properties-File has MySQL Lines uncommented and hibernate.cfg.xml is modified too. Web.xml contains servlet Information and its ressorce Information. What did I do wrong?!?
Lena


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 4:35 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you have manually added the jars into directory (web-inf/lib) but did you declare these jar in the eclipse tomcat project?

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 4:41 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
Do you mean to import required jars as External jars via Project properties?
Lena


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 4:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
1- remove hibernate & dependant jars from TOMCAT/common/lib
2- check that all needed jars are into webapp/yourApp/WEB-INF/lib
3- right click on project root + properties + java build path + add jars (not external jars) and add all you can

restart tomcat

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 5:58 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
It didn't help...
I think, I re-install hibernate and make a new Test-Project.

Thenk you very much!
Lena


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 7:26 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
Hier I am again... My new Test-Project was OK. I inserted to Cats in my DB Table(Hibernate example)!!!
Then I've decided to make a new Project. And then I've got

java.lang.NoClassDefFoundError: org/dom4j/Attribute
again.
After deleting the second Project, I found out that my Cat-Servlet (first Project) doesen't work any more, though I didn'change anything since then. Root Cause:
java.lang.NoClassDefFoundError: org/dom4j/Attribute !!!
and hibernate.cfg.xml - File is missing.
HEEEELP! I don't know what should I do...


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