Hallo zusammen,
ich versuche gerade, Hibernate zum mit der Datenbank H2 zu benutzen. Nachdem ich versuche eine Confoguration zu erstellen kommt folgender Fehler:
Meine hibernate.cfg.xml Datei (falls es weiterhilft) sieht folgendermassen aus:
[XML]<!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="dialect">
org.hibernate.dialect.H2Dialect
</property>
<property name="connection.driver_class">
org.h2.Driver
</property>
<property name="connection.username">
sa
</property>
<property name="connection.password">
</property>
<property name="connection.url">
jdbc:h2:file:hibernate/db/database
</property>
<mapping resource=
"hibernate/mappings/Eventtyp.hbm.xml"
/>
</session-factory>
</hibernate-configuration>[/XML]
Weiß jemand, was ich falsch gemacht habe?
Danke im Voraus.
ich versuche gerade, Hibernate zum mit der Datenbank H2 zu benutzen. Nachdem ich versuche eine Confoguration zu erstellen kommt folgender Fehler:
Java:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1528)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
at database.EventtypDatabase.main(EventtypDatabase.java:8)
Caused by: org.dom4j.DocumentException: [url]http://hibernate.sourceforge.net/hibernate-configuration-%0A3.0.dtd[/url] Nested exception: [url]http://hibernate.sourceforge.net/hibernate-configuration-%0A3.0.dtd[/url]
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
... 3 more
Meine hibernate.cfg.xml Datei (falls es weiterhilft) sieht folgendermassen aus:
[XML]<!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="dialect">
org.hibernate.dialect.H2Dialect
</property>
<property name="connection.driver_class">
org.h2.Driver
</property>
<property name="connection.username">
sa
</property>
<property name="connection.password">
</property>
<property name="connection.url">
jdbc:h2:file:hibernate/db/database
</property>
<mapping resource=
"hibernate/mappings/Eventtyp.hbm.xml"
/>
</session-factory>
</hibernate-configuration>[/XML]
Weiß jemand, was ich falsch gemacht habe?
Danke im Voraus.