Salut à tous et bonne année 2007;
J ai suivi la procédure d’installation d’un exemple simple d'utilisation avec hibernate
C comme dans le lien suivant :
http://www.laliluna.de/dow load/first-hiber ate-example-tutorial-fr.pdf
Mais lorsque j ai exécuté l’application avec RUN plusieurs erreurs s’affichent malgré que j ai j ai mettais tous les APIs de hibernate et log4j.jar et les déclarer dans classpath Et aussi log4j.properties
Voila les erreurs qui s'affichent :
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
%%%% Error Creating HibernateSessionFactory %%%%
org.hibernate.HibernateException: /hibernate.cfg.xml not found
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1402)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1424)
at src.de.laliluna.hibernate.InitSessionFactory.initSessionFactory(InitSessionFactory.java:104)
at src.de.laliluna.hibernate.InitSessionFactory.getInstance(InitSessionFactory.java:60)
at src.de.laliluna.example.TestExample.createHoney(TestExample.java:78)
at src.de.laliluna.example.TestExample.main(TestExample.java:31)
org.hibernate.HibernateException: Could not initialize the Hibernate configuration
at src.de.laliluna.hibernate.InitSessionFactory.initSessionFactory(InitSessionFactory.java:121)
at src.de.laliluna.hibernate.InitSessionFactory.getInstance(InitSessionFactory.java:60)
at src.de.laliluna.example.TestExample.createHoney(TestExample.java:78)
at src.de.laliluna.example.TestExample.main(TestExample.java:31)
Exception in thread "main"
Merci beq pour vos aides
Partager