Javatpoint Logo

why "Could not parse configuration: /Hibernate.cfg.xml" occurs

By: prabha*** On: Sat May 02 18:52:20 IST 2015     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
while running a hibernate program i was getting the following error, why do we get HibernateException

1036 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: /Hibernate.cfg.xml(1) The processing instruction must begin with the name of the target.
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /Hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2246)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2158)
at com.tcs.ilp.hibernate.ManageEmployee.addEmployee(ManageEmployee.java:19)
at com.tcs.ilp.hibernate.ManageEmployee.main(ManageEmployee.java:12)
Caused by: org.dom4j.DocumentException: Error on line 1 of document : The processing instruction must begin with the name of the target. Nested exception: The processing instruction must begin with the name of the target.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2238)
... 3 more
Up0Down