-->
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.  [ 2 posts ] 
Author Message
 Post subject: Initial SessionFactory creation failed
PostPosted: Sat Feb 09, 2008 1:55 am 
Newbie

Joined: Sat Feb 09, 2008 1:43 am
Posts: 3
Location: Sri Lanka
when I'm run my program it show this error


Code:
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Exception in thread "main" java.lang.ExceptionInInitializerError
        at util.HibernateUtil.<clinit>(HibernateUtil.java:30)
        at hibernate.Main.listEvents(Main.java:47)
        at hibernate.Main.main(Main.java:33)
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException
        at util.HibernateUtil.<clinit>(HibernateUtil.java:26)
        ... 2 more
Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 3 more




And I want to know how to integrate Hibernate with Java Desktop application. Actually I want to access database using hibernate( with out writing SQL queries).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 09, 2008 8:58 am 
Beginner
Beginner

Joined: Thu Jun 07, 2007 2:38 am
Posts: 28
Location: Italy, Rome
You are missing a jar file on your classpath which is used by Hibernate. You can add this jar to your classpath.

In general you probably need to add more jar files to your classpath which are used by Hibernate.

A way to solve this problem more automatically is to use Maven. You specify in your pom.xml file that you use Hibernate and Maven knows and downloads all the jar files you need.


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