2 Replies Latest reply on Feb 21, 2007 4:48 AM by Andreas Rehn

    ERROR: ... CGLIB Enhancement failed ...

    Andreas Rehn Newbie

      Hi, i'm just starting up with jbpm and trying to get it to work with my Oracle 10g DB. I've written a small test case just creating the schema, and deploying a simple process but I get "CGLIB Enhancement failed" errors on alot (maybe all) hinernate-mapped classes, see the log below.


      3625 [main] ERROR org.hibernate.proxy.BasicLazyInitializer - CGLIB Enhancement failed: org.jbpm.taskmgmt.log.TaskAssignLog
      java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
      at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:118)
      at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
      at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
      at org.hibernate.tuple.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:131)
      at org.hibernate.tuple.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
      at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
      at org.hibernate.tuple.EntityMetamodel.(EntityMetamodel.java:257)
      at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:412)
      at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:108)
      at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:216)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
      at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPersistenceServiceFactory.java:109)
      at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:441)
      at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:433)
      at se.marakanda.mworkflow.TestJBPM.setUp(TestJBPM.java:36)
      at junit.framework.TestCase.runBare(TestCase.java:125)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at junit.textui.TestRunner.doRun(TestRunner.java:116)
      at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:58)
      at junit.textui.TestRunner.start(TestRunner.java:172)
      at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23)
      at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:98)
      at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
      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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)


      I've searched the form and found nothing but found this on Hibernate FAQ:


      I get org.hibernate.HibernateException: CGLIB Enhancement failed: ?

      If you use lazy loading with proxies (default for all classes in Hibernate 3), Hibernate needs to subclass your class at runtime. It can't do this if you have a private no-argument constructor. As per documentation, at least package visibility is required.


      I've checked the jbpm code and there are ofcource no "private no-argument constructors", they are all public... so i'm wondering what's going on here? Anoyone has any idea? I have probably missed something but i'm kind of stuck so i'd appreciate all help.

      Tnx

      /Andreas