Hi
I just started reading Hibernate
and did one application.
But I got error..
[main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
[main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
[main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
Exception in thread "main" java.lang.ExceptionInInitializerError at HibernateUtil.buildSessionFactory(HibernateUtil.java:15)
at HibernateUtil.<clinit>(HibernateUtil.java:6)
at Test.addUser(Test.java:59)
at Test.main(Test.java:18)
Caused by: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at HibernateUtil.buildSessionFactory(HibernateUtil.java:10)
... 3 more
Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1532)
... 6 more
sounds like there is something wrong with your Hibernate configuration file. Maybe it is not a valid XML file. Check if the content of the file is valid XML and if it's a valid Hibernate configuration file.
Actually I don't know which jar files are needed .
I am reffering the link http://blog.sencide.com/2011/03/hibernate-tutorial-for-beginners.html. for learning basic application.
I have downloaded hibernate-release-4.1.9.Final .
But it dosn't have the files
1) cglib-2.2.2.jar
2)commons-collections-3.2.1.jar
3)jta-1.1.jar
So i downloaded these saperatly and add these as external jar files.