Hibernate version: 3.03 (cglib 2.1.0)
I get the exception below only for some of my persistent classes. This results,
as you'd expect, with the code misbehaving once the configuration
phase completes and the actual interaction using Hibernate begins.
I admit to not knowing much about cglib, but I found some references
to a change in cglib regarding private constructors, but those classes
that fail all have protected default (no args) constructors.
Code:
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at au.com.siemens.ecs.spct.model.beans.IGR$$EnhancerByCGLIB$$13f72024.CGLIB$STATICHOOK17(<generated>)
at au.com.siemens.ecs.spct.model.beans.IGR$$EnhancerByCGLIB$$13f72024.<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:586)
at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:579)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:601)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:532)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:373)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:281)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:640)
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:96)
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:217)
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:210)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
at au.com.siemens.ecs.spct.util.persistence.HibernateUtil.afterPropertiesSet(HibernateUtil.java:92)
at au.com.siemens.ecs.spct.AbstractHibernateTestCase.initHibernateUtil(AbstractHibernateTestCase.java:107)
at au.com.siemens.ecs.spct.AbstractHibernateTestCase.<clinit>(AbstractHibernateTestCase.java:30)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUnitTestRunner.java:204)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUnitTestRunner.java:177)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:651)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:558)
10:03:19,031 WARN main org.hibernate.tuple.PojoTuplizer - could not create proxy factory for:au.com.siemens.ecs.spct.model.beans.IGR
The exception is severe enough (I think) that Hibernate should not be
expected to continue to work and so I would have assumed that
I should get a fatal configuration / session factory building error?
Any help resolving this will be appreciated.