Joined: Wed May 18, 2005 4:34 pm Posts: 2
|
I have an spring+hibernate3 application that uses two databases: postgresql and M$ sqlserver. When the application initializes the SQL Server sessionFactory, I see the following CGLIB exception:
4110 [main] ERROR proxy.BasicLazyInitializer - CGLIB Enhancement failed: com.triage.model.domain.lims.Test java.lang.IllegalArgumentException: class com.triage.model.domain.lims.Test$$EnhancerByCGLIB$$cd3e1044 is not an enhanced class
at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:588)
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: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: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 org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:758)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:685)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
...
4125 [main] WARN tuple.PojoTuplizer - could not create proxy factory for:com.triage.model.domain.lims.Test org.hibernate.HibernateException: CGLIB Enhancement failed: com.triage.model.domain.lims.Test
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: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 org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:758)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:685)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
at
...
I've made sure that I'm using the latest cglib (2.1) and that there is only one cglib in my classpath. I also tried setting 'hibernate.cglib.use_reflection_optimizer=false' but nothing changed.
I'm using the latest hibernate version (3.0.3)...any ideas?
*I can post the hibernate mapping file for the Test class and/or the full exception trace if it will help
|
|