I recently found I was having this problem too, when I was not before.
It turns out that it was something to do with having more than one version of the cglib jar file in the web app's class path. Though I am not sure if it is this jar file, or any of the other jar files that hibernate uses and depends on, as I also had the rest of the hibernate jar files in the class path in a different version.
By removing conflicting versions of the cglib & other jars, things worked again.
My environment was using
tomcat, i had set up my instance to place a bunch of commonly used, third party jar files into ${CATALINA_BASE}/shared/lib folder, since the webapps i was running in this tomcat instance all were using the same version of hibernate,
struts, etc.
(Note that the shared/lib folder is the one on your CATALINA_BASE, or instance, not the CATALINA_HOME, the installation folder for tomcat, though most default installed instances, these are the same, just one of those things that drove me nuts at first...)
With these jar files located here, they are loaded according to the
servlet spec / tomcat's class loader tree as:
${CATALINA_HOME}/common/lib
${CATALINE_BASE}/shared/lib
<the webapp>/WEB-INF/lib
This particular war file i was building was packaging (an older version) of hibernate.jar and its supporting third party jar files into the war file.
so something was amiss there; removing them from the jar file (as the newer ones i had in the shared/lib folder would provide for my webapp)
I guess one could also have removed them from the shared/lib and made each web app have their own copy of the jar files.
I have found though with tomcat 5, now that it uses commons logging, it likes to have log4j in the common/lib folder.