Has anyone ever had an instance where the CGLIB optimizer didn't work under some conditions? I have two computers (desktop/laptop) that are very similar. I think the JDK versions might be a little off, but they are both 1.5.
I am using Netbeans on both to build my application. They both have identical source code bases for my application, I just took clean copies from CVS on both machines.
the JAR file that is generated on my desktop runs fine on both the laptop, desktop and server. The JAR that is generated on my laptop won't run on any of them... and it generates errors during the CGLIB optimization process.
I am using hibernate 3, with the most recent stable version of CGLIB. Here is a sample error message... (and yes, i have public no arg const for all my mapping classes).
Code:
2006-08-10 14:22:27,055 ERROR [main] (CGLIBLazyInitializer.java:103) - CGLIB Enhancement failed: com.connectfirst.intelliqueue.model.SOAPServiceInput
java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/XMLType
at com.connectfirst.intelliqueue.model.SOAPService.<clinit>(SOAPService.java:94)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.connectfirst.intelliqueue.model.SOAPServiceInput$$EnhancerByCGLIB$$c6a08eda.CGLIB$STATICHOOK1(<generated>)
at com.connectfirst.intelliqueue.model.SOAPServiceInput$$EnhancerByCGLIB$$c6a08eda.<clinit>(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:547)
at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:536)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:562)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:493)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:597)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:94)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:42)
at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:144)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:83)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:218)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:211)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at com.connectfirst.intelliqueue.utils.HibernateUtil.<clinit>(HibernateUtil.java:36)
at com.connectfirst.intelliqueue.IntelliQueue.startup(IntelliQueue.java:96)
at com.connectfirst.intelliqueue.IntelliQueue.main(IntelliQueue.java:54)
2006-08-10 14:22:28,550 WARN [main] (PojoTuplizer.java:156) - could not create proxy factory for:com.connectfirst.intelliqueue.model.SOAPServiceInput
org.hibernate.HibernateException: CGLIB Enhancement failed: com.connectfirst.intelliqueue.model.SOAPServiceInput
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:108)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:42)
at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:144)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:83)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:218)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:211)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at com.connectfirst.intelliqueue.utils.HibernateUtil.<clinit>(HibernateUtil.java:36)
at com.connectfirst.intelliqueue.IntelliQueue.startup(IntelliQueue.java:96)
at com.connectfirst.intelliqueue.IntelliQueue.main(IntelliQueue.java:54)
Caused by: java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/XMLType
at com.connectfirst.intelliqueue.model.SOAPService.<clinit>(SOAPService.java:94)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.connectfirst.intelliqueue.model.SOAPServiceInput$$EnhancerByCGLIB$$c6a08eda.CGLIB$STATICHOOK1(<generated>)
at com.connectfirst.intelliqueue.model.SOAPServiceInput$$EnhancerByCGLIB$$c6a08eda.<clinit>(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:547)
at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:536)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:562)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:493)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:597)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:94)
... 14 more
2006-08-10 14:22:28,932 ERROR [main] (CGLIBLazyInitializer.java:103) - CGLIB Enhancement failed: com.connectfirst.intelliqueue.model.Gate
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.connectfirst.intelliqueue.model.Gate$$EnhancerByCGLIB$$e623e5b5.CGLIB$STATICHOOK4(<generated>)
at com.connectfirst.intelliqueue.model.Gate$$EnhancerByCGLIB$$e623e5b5.<clinit>(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:547)
at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:536)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:562)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:493)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:597)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:94)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:42)
at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:144)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:83)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:218)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:211)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at com.connectfirst.intelliqueue.utils.HibernateUtil.<clinit>(HibernateUtil.java:36)
at com.connectfirst.intelliqueue.IntelliQueue.startup(IntelliQueue.java:96)
at com.connectfirst.intelliqueue.IntelliQueue.main(IntelliQueue.java:54)
2006-08-10 14:22:30,107 WARN [main] (PojoTuplizer.java:156) - could not create proxy factory for:com.connectfirst.intelliqueue.model.Gate
org.hibernate.HibernateException: CGLIB Enhancement failed: com.connectfirst.intelliqueue.model.Gate
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:108)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:42)
at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:144)
at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:83)
at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:218)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:211)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at com.connectfirst.intelliqueue.utils.HibernateUtil.<clinit>(HibernateUtil.java:36)
at com.connectfirst.intelliqueue.IntelliQueue.startup(IntelliQueue.java:96)
at com.connectfirst.intelliqueue.IntelliQueue.main(IntelliQueue.java:54)
Caused by: java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.connectfirst.intelliqueue.model.Gate$$EnhancerByCGLIB$$e623e5b5.CGLIB$STATICHOOK4(<generated>)
at com.connectfirst.intelliqueue.model.Gate$$EnhancerByCGLIB$$e623e5b5.<clinit>(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:547)
at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:536)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:562)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:493)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:597)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:94)
... 14 more