I've unzipped the contents of the hibernate 3.3.1 core zip installation file. Then I grabbed what I *think* are the necessary jar files located under the "lib" directory. But in the current version (3.3.1) there are 3 folders under the "lib" directory. One of the directory is called "required", so I figured I just need to grab the 6 jar files in this directory then save them to a directory called d:\_hiblib, which I have designated in my classpath. I installed an older version of hibernate (3.2.5) and it had more jar files, but in this current version, there are fewer jar files so it seems.
Then I unzipped the contents of the hibernate annotations zip installation file (ver 3.4) and then moved the 3 jar files to the c:\_hiblib directory.
Then I created a User.java and then compiled it. It compiled successfully. But when I went to run it (java.exe), I get the failed to load class "org.slf4j.impl.StaticLoggerBinder" error message and it even also states to visit http://www.slf4j.org/codes.html#StaticLoggerBinder for more info. I went to that link and it states:
"This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem."
OK...so I downloaded an installation zip file from the SLF4J site and grabbed one of those jar files and saved it in the c:\_hiblib directory. Re-compiled (successful) my java source file (User.java), but still I get another different error. So I went back and removed that jar file, and installed the other jar file, and did this (one by one) until I won't get an error message. Well it turns out no matter which slf4j jar file I install into my c:\_hiblb directory, I still get error message at runtime.
I know there's nothing wrong with my java source file (User.java) or my MySQL setup since what I did was revert back to the old hibernate version and everything works fine (compiles and executes correctly). But dang it, with this new version, it seems I'm missing a jar file or perhaps I got a corrupt file. But I re-downloaded the installation zip file and still no change. I also installed the jar files located in the "optional" and "bytecode" folders under the lib folder.
Any ideas? Anyone else seeing this? Can someone please list out the jar files that I need at minimum?
Originally posted by Dan Kim: I thought maybe I should ask this since I'm not sure I am interpreting the Compatibility Matrix correctly. Is hibernate core 3.3.1 compatible with hibernate annotations 3.4?
This compatibility matrix does not talk about Hibernate core 3.3.1, but it does say Hibernate 3.3.0 SP1 is compatible with Hibernate Annotations 3.4.x. So i believe Hibernate Core 3.3.1 too is.
Thanks but I'm just not going to use this version. If I can't install it correctly after just copying the jar files in the installation zip files, then this version just isn't worth the hassle. I don't think I am doing anything wrong per se or perhaps just unlucky. Installed again but to a totally different machine, but I still have problems. But when I install the older 3.2.5 version, everything works ok. I don't know what to think, I am using a latest GA version, so this is weird. All those version testers can't be wrong. Oh well...
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:419) at java.lang.ClassLoader.loadClass(ClassLoader.java:643) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:300) at java.lang.ClassLoader.loadClass(ClassLoader.java:609) ... 39 more