-->
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.  [ 3 posts ] 
Author Message
 Post subject: problem at configuration
PostPosted: Wed Feb 18, 2004 6:40 pm 
Newbie

Joined: Wed Feb 18, 2004 6:23 pm
Posts: 1
Hi,
I'm using hibernate-2.1 and I have a problem when the program do this:
sessionFactory = new Configuration().configure().buildSessionFactory();

This is my hibernate.cfg.xml:

<?xml version='1.0' encoding='utf-8'?>
<!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.mysql.jdbc.Driver</property>
<property name="Hibernate.connection.url">jdbc:mysql://localhost/bantec</property>
<property name="Hibernate.connection.username">root</property>
<property name="Hibernate.connection.password"></property>
<property name="dialect">net.sf.Hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<!--
<property name="transaction.factory_class">
net.sf.Hibernate.transaction.JDBCTransactionFactory
</property>
<property name="Hibernate.cache.provider_class">
net.sf.Hibernate.cache.HashtableCacheProvider
</property>
<property name="Hibernate.hbm2ddl.auto">update</property>
-->
<mapping resource="Donante.hbm.xml"/>

</session-factory>

</Hibernate-configuration>


And this is the trace:

18-feb-2004 23:14:52 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.2
18-feb-2004 23:14:52 net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
18-feb-2004 23:14:52 net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
18-feb-2004 23:14:52 net.sf.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
18-feb-2004 23:14:52 net.sf.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
18-feb-2004 23:14:54 net.sf.hibernate.cfg.Configuration doConfigure
GRAVE: problem parsing configuration/hibernate.cfg.xml
org.dom4j.DocumentException: http://Hibernate.sourceforge.net/Hibern ... on-2.0.dtd Nested exception: http://Hibernate.sourceforge.net/Hibern ... on-2.0.dtd
at org.dom4j.io.SAXReader.read(SAXReader.java:358)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:912)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:856)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:842)
at HibernateUtil.<clinit>(HibernateUtil.java:23)
at AltaDonante.doPost(AltaDonante.java:42)
at AltaDonante.doGet(AltaDonante.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
....

and then...

Nested exception:
java.io.FileNotFoundException: http://Hibernate.sourceforge.net/Hibern ... on-2.0.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:713)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
... etc,etc

Anybody can help me?
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 6:45 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
use small h's in the DTD URL


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 1:42 am 
Newbie

Joined: Wed Feb 18, 2004 1:38 am
Posts: 1
try this:

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

I'm not sure it is userful to you.


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

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.