problème avec hibernate.cfg.xml
j'obtient l'erreur suivante en executant mon application:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Exception in thread "main" java.lang.ExceptionInInitializerError
at tn.com.tradenet.netadmin.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:22)
at test.TestHibernate.main(TestHibernate.java:31)
Caused by: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1500)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
at tn.com.tradenet.netadmin.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:17)
... 1 more
Caused by: org.dom4j.DocumentException: Error on line 5 of document : The system identifier must begin with either a single or double quote character. Nested exception: The system identifier must begin with either a single or double quote character.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1490)
... 4 more |
mon fichier de configuration d'hibernate est:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
org.postgresql.Driver
</property>
<property name="hibernate.connection.password">pwd</property>
<property name="hibernate.connection.url">
jdbc:postgresql://localhost/Test
</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.default_schema">NetAdmin</property>
<property name="hibernate.dialect">
org.hibernate.dialect.PostgreSQLDialect
</property>
<mapping resource="Users.hbm" />
<mapping resource="Comptes.hbm" />
</session-factory>
</hibernate-configuration> |