Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Exception org.dom4j.DocumentException: unknown protocol: classpath Nested except

 
Dhara Dash
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am a beginner to Hibernate & getting the following exception while trying to run my first program

Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1491)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
at MyPackage.StoreData.main(StoreData.java:13)
Caused by: org.dom4j.DocumentException: unknown protocol: classpath Nested exception: unknown protocol: classpath
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1481)
... 2 more

here is my hibernate.cfg.xml file

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>

<session-factory>
<property name="hbm2ddl.auto">update</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.url">jdbc: oracle//localhost:1521/MYDB</property>
...........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic