alexandrubarbat wrote:
In order to work you must have in the class path the following jars:
slf4j-api-1.5.3.jar
slf4j-log4j12-1.5.3.jar
The classes from those jars are need it at runtime not at compilation time.
slf4j-api-1.5.3.jar - i've put this one from the beggining, cause i found it in the "required" directory of the hibernate distribution. THe only difference is that there is version 1.5.3, but it doesn't matter. So, i added second library
slf4j-log4j12-1.5.2.jar in the classpath, but it doesn't work anyway. It gives me another exception:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Level
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
at util.Main.main(Main.java:14)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 3 more