Bonjour,
J'essaye de me taper le tuto Hibernate suivant :
http://www.hibernate.org/hib_docs/v3.../tutorial.html
Tt allait bien jusKau point :
1.2.6. Charger et stocker des objets
En effet, on demande ici de lancer la commande suivante :
C:\hibernateTutorial\>ant run -Daction=store
Malheureusement pour moi voici le résultat de la construction :
C:\Documents and Settings\DarkWark\workspace\FirstHibernate>ant run -Daction=store
Buildfile: build.xml
clean:
[delete] Deleting directory C:\Documents and Settings\DarkWark\workspace\FirstHibernate\bin
[mkdir] Created dir: C:\Documents and Settings\DarkWark\workspace\FirstHibernate\bin
copy-resources:
[copy] Copying 3 files to C:\Documents and Settings\DarkWark\workspace\FirstHibernate\bin
[copy] Copied 3 empty directories to 2 empty directories under C:\Documents and Settings\DarkWark\workspace\FirstHibern
ate\bin
compile:
[javac] Compiling 3 source files to C:\Documents and Settings\DarkWark\workspace\FirstHibernate\bin
run:
[java] Initial SessionFactory creation failed.java.lang.ExceptionInInitializerError
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: java.lang.ExceptionInInitializerError
[java] ... 3 more
[java] Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationExce
ption: No suitable Log constructor [Ljava.lang.Class;@530daa for org.apache.commons.logging.impl.Log4JLogger (Caused by java
.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No s
uitable Log constructor [Ljava.lang.Class;@530daa for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoCla
ssDefFoundError: org/apache/log4j/Category))
[java] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
[java] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
[java] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
[java] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
[java] at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:116)
[java] ... 3 more
[java] Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@
530daa for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)
[java] at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
[java] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
[java] ... 7 more
[java] Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
[java] at java.lang.Class.getDeclaredConstructors0(Native Method)
[java] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
[java] at java.lang.Class.getConstructor0(Class.java:2640)
[java] at java.lang.Class.getConstructor(Class.java:1629)
[java] at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
[java] ... 8 more
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 2 seconds
Estce ke qq'un aurait une idée ?
Partager