We help IT Professionals succeed at work.

Hibernate cfg xml error

mannsingh3
mannsingh3 asked
on
Hello

I am trying to learn hibernate using postgres db on my laptop . I have attached the  hibernate.cfg.xml file and also pasted a error code , can somebody help me debug it


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 org.hibernate.cfg.Configuration.configure(Configuration.java:2137)
      at org.koushik.hibernate.HibernateTest.main(HibernateTest.java:20)
Caused by: org.dom4j.DocumentException: Error on line 2 of document  : The processing instruction target matching "[xX][mM][lL]" is not allowed. Nested exception: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      at org.dom4j.io.SAXReader.read(SAXReader.java:482)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2238)
      ... 3 more

hibernate.cfg.xml
Comment
Watch Question

Remove an empty first line.