• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError: org/dom4j/io/SAXReader

 
Pranav Pal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the exception:

java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader

while executing following line:

sessionFactory = new Configuration().configure().buildSessionFactory();

What can be the reason for this exception?
 
ishan dave
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I think your configuration object could not be created.
the reason behind is "unable to parse your configuration xml file"

have you provided the dom4j.jar file in your class path ?
if not then please add this jar file your problem may get solved.

with best regards,
ishaan
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!