All:
I deployed a web application to the Tomcat 9.0.13 server, under the
WEB-INF/lib there are Hibernate related jar files. When I start the server, it
give me errors in many Hibernate mapping classes:
1991 [main] ERROR proxy.BasicLazyInitializer - CGLIB Enhancement failed:
com.usps.nom.tops.model.impl.ComputedHardCloseoutImpl
java.lang.NoClassDefFoundError: Could not initialize class
net.sf.cglib.proxy.Enhancer
at
org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
The original Cglib version is cglib-2.1.jar, and I try the latest
cglib-3.2.12.jar, the original error is gone but a different error show up:
1619 [main] ERROR proxy.BasicLazyInitializer - CGLIB Enhancement failed:
com.usps.nom.tops.model.transportation.AplDispatch
java.lang.NoClassDefFoundError: net.sf.cglib.core.AbstractClassGenerator
at
org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
at
org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
I have tried different versions of Cglib jars file:
cglib-2.1.jar, cglib-2.1_3.jar, cglib-3.2.1.jar, cglib-3.2.12.jar,
cglib-nodep-2.1.jar, cglib-nodep-3.2.12.jar
But they always give me one of the above errors.
The other Hibernate related jars under WEB-INF/lib are: ehcache-1.1.jar,
ehcache-core-2.4.8.jar, hibernate3.jar(3.1.0)
If I start the Tomcat server locally in my Eclipse project , there is no such
errors. Can anybody help? Thanks
Gary Hua
USPS - St. Louis - TOPS Team
Phone: 314-923-2522
E-Mail: [email protected]