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