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.  [ 1 post ] 
Author Message
 Post subject: Parser could not parse hibnernate dtd
PostPosted: Thu Jul 01, 2004 1:56 pm 
Newbie

Joined: Wed Jun 30, 2004 3:51 pm
Posts: 7
I've seen some discussions on this subject, but I could not find a clear answer, so please somebody help me. I am doing a major POC on Hibernate, and these are my first stumbling blocks.

I have all Hibernate required jars in the classpath,
as well as Hibernate mapping files.

Here is my mapping file:


<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

hibernate-configuration>

<session-factory>
<property name="hibernate.connection.driver_class">COM.ibm.db2.jdbc.net.DB2Driver</property>
<property name="hibernate.connection.url">jdbc:db2://PIERCETI:6789/SKILSTRK</property>
<property name="hibernate.connection.username">db2admin</property>
<property name="hibernate.connection.password">admin</property>
<property name="dialect">cirrus.hibernate.sql.DB2Dialect</property>


<mapping resource="org/ebegoli/hibernate/Level.hbm.xml"/>

</session-factory>

</hibernate-configuration>


I tried without putting DTDs in the classpath (expecting parser to pick it up from the web), and I tried extracting the dtds under the sf/hibernate/.... In any case I get this exception when I run it in my Java Project. I am running it with Eclipse 3.0:


23657 [main] ERROR net.sf.hibernate.cfg.Configuration - Could not configure datastore from input stream
org.dom4j.DocumentException: Error on line 4 of document : External entity not found: "http://hibernate.sourceforge.net/hibernate-mapping.dtd". Nested exception: External entity not found: "http://hibernate.sourceforge.net/hibernate-mapping.dtd".
at org.dom4j.io.SAXReader.read(SAXReader.java:355)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:283)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:333)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:990)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:946)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:874)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:860)
at org.ebegoli.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:13)
at org.ebegoli.hibernate.TestHibernate.main(TestHibernate.java:29)
Nested exception:
java.net.ConnectException: Connection timed out: connect
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.externalParameterEntity(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:283)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:333)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:990)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:946)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:874)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:860)
at org.ebegoli.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:13)
at org.ebegoli.hibernate.TestHibernate.main(TestHibernate.java:29)
java.lang.ExceptionInInitializerError
at org.ebegoli.hibernate.TestHibernate.main(TestHibernate.java:29)
Caused by: java.lang.RuntimeException: Configuration problem: Error reading resource: org/ebegoli/hibernate/Level.hbm.xml
at org.ebegoli.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:15)
... 1 more
Exception in thread "main"


Please help,
Edmon


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.