I'm trying to move a web app I've got from Tomcat to JBOSS. The app makes use of Hibernate 3. When I start up JBOSS I get the error below. If I simply remove cglib-full-2.0.1.jar from jboss-4.0.1sp1\server\[default|all]\deploy\jboss-hibernate.deployer then everything is happy (i.e., it starts up but I haven't tested much). That seems like too much of a hack though and it leaves behind other Hibernate 2 jar files in the same directories. My question: Is there a proper way of solving this problem? Any help would be appreciated.
16:40:20,921 INFO [SettingsFactory] Default entity-mode: pojo
16:40:20,968 INFO [SessionFactoryImpl] building session factory
16:40:21,687 INFO [STDOUT] java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
16:40:21,687 INFO [STDOUT] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
To answer my own question... you delete the jboss-hibernate.deployer directory. Apparently you can optionally replace it with one from H3 but it works fine for me to completely remove it and use the hibernate in my war file. Be sure to do the same thing in 'default' and 'all' if needed.