Bonjour, 
je suis en train de faire le tutorial : 
	
	http://defaut.developpez.com/tutoriel/java/eclipse/hibernate/
 que je trouve très bien (au passage...) jusque au moment de l'execution.
Voici l'erreur que j'obtiens et dont je n'y comprends rien du tout...
merci pour tout aide.
	
	| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 
 |  
log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.ExceptionInInitializerError
	at Test.insert(Test.java:19)
	at Test.main(Test.java:13)
Caused by: java.lang.RuntimeException: Problème de configuration : problem parsing configuration/hibernate.cfg.xml
	at com.minosis.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:13)
	... 2 more
Caused by: net.sf.hibernate.HibernateException: problem parsing configuration/hibernate.cfg.xml
	at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:958)
	at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897)
	at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:883)
	at com.minosis.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:11)
	... 2 more
Caused by: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
	at org.dom4j.io.SAXReader.read(SAXReader.java:358)
	at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:953)
	... 5 more | 
 mon fichier : hibernate.cfg.xml : 
	
	| 12
 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//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 
<hibernate-configuration>
    <session-factory >
 
		<!-- local connection properties -->
		<property name="hibernate.connection.url">jdbc:mysql://localhost/base1</property>
		<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password"></property>
		<!-- property name="hibernate.connection.pool_size"></property -->
 
		<!-- dialect for MySQL -->
        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
 
        <property name="hibernate.show_sql">false</property>
        <property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
    </session-factory>
</hibernate-configuration> | 
 
						
					
Partager