java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Callback

Hibernate JIRA | Montagnon Cyril | 8 years ago
  1. 0

    When forcing hibernate to use CGLIB (by the way javassist is still slower than CGLib), I get the following exception (at the end of the post) It seems that the repackaging of the CGLIB project (hibernate-cglib-repack) doesn't behave as expected : Shouldn't it look up for the org.hibernate.repackage.cglib.proxy.Callback class instead of the net.sf.cglib.proxy.Callback class. java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Callback at org.hibernate.repackage.cglib.proxy.Enhancer.class$(Enhancer.java:68) at org.hibernate.repackage.cglib.proxy.Enhancer.getCallbacksSetter(Enhancer.java:627) at org.hibernate.repackage.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:615) at org.hibernate.repackage.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609) at org.hibernate.repackage.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:578) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyInstance(CGLIBLazyInitializer.java:133) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:116) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.getProxy(CGLIBProxyFactory.java:72) at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:402) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3483) at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:298) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:219) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:822) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:815) at org.springframework.orm.hibernate3.HibernateTemplate$3.doInHibernate(HibernateTemplate.java:566) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:560) at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:554) at north.stardust2.core.test.unit.dao.listed.IndexCompositionDaoTest.findIndexCompositionByListedIndexAt(IndexCompositionDaoTest.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.junit.internal.runners.CompositeRunner.runChildren(CompositeRunner.java:33) at org.junit.runners.Suite.access$000(Suite.java:26) at org.junit.runners.Suite$1.run(Suite.java:93) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.runners.Suite.run(Suite.java:91) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Hibernate JIRA | 8 years ago | Montagnon Cyril
    java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Callback
  2. 0

    When forcing hibernate to use CGLIB (by the way javassist is still slower than CGLib), I get the following exception (at the end of the post) It seems that the repackaging of the CGLIB project (hibernate-cglib-repack) doesn't behave as expected : Shouldn't it look up for the org.hibernate.repackage.cglib.proxy.Callback class instead of the net.sf.cglib.proxy.Callback class. java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Callback at org.hibernate.repackage.cglib.proxy.Enhancer.class$(Enhancer.java:68) at org.hibernate.repackage.cglib.proxy.Enhancer.getCallbacksSetter(Enhancer.java:627) at org.hibernate.repackage.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:615) at org.hibernate.repackage.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609) at org.hibernate.repackage.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:578) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyInstance(CGLIBLazyInitializer.java:133) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:116) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.getProxy(CGLIBProxyFactory.java:72) at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:402) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3483) at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:298) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:219) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:822) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:815) at org.springframework.orm.hibernate3.HibernateTemplate$3.doInHibernate(HibernateTemplate.java:566) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:560) at org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:554) at north.stardust2.core.test.unit.dao.listed.IndexCompositionDaoTest.findIndexCompositionByListedIndexAt(IndexCompositionDaoTest.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.junit.internal.runners.CompositeRunner.runChildren(CompositeRunner.java:33) at org.junit.runners.Suite.access$000(Suite.java:26) at org.junit.runners.Suite$1.run(Suite.java:93) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.runners.Suite.run(Suite.java:91) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Hibernate JIRA | 8 years ago | Montagnon Cyril
    java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Callback
  3. 0

    Guice 2 prerelease snapshot 20081016

    Google Groups | 8 years ago | je...@swank.ca
    java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    addEjbModule failed for com.ibm.ejs.models.base.config.applicationserver.impl.EJBModuleRefImpl

    Google Groups | 10 years ago | mural...@yahoo.co.in
    java.lang.NoClassDefFoundError: com/ibm/ejs/container/EJSWrapperBase
  6. 0

    Administrator goes south - Tomcat wants more than 8096 file handles

    Google Groups | 5 years ago | Al Holden
    java.lang.NoClassDefFoundError: com/naryx/tagfusion/cfm/parser/CFMLParser$element_return

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      net.sf.cglib.proxy.Callback

      at org.hibernate.repackage.cglib.proxy.Enhancer.class$()
    2. Hibernate CGLIB Repackaging
      Enhancer.registerCallbacks
      1. org.hibernate.repackage.cglib.proxy.Enhancer.class$(Enhancer.java:68)
      2. org.hibernate.repackage.cglib.proxy.Enhancer.getCallbacksSetter(Enhancer.java:627)
      3. org.hibernate.repackage.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:615)
      4. org.hibernate.repackage.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609)
      5. org.hibernate.repackage.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:578)
      5 frames
    3. Hibernate
      CGLIBProxyFactory.getProxy
      1. org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyInstance(CGLIBLazyInitializer.java:133)
      2. org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:116)
      3. org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.getProxy(CGLIBProxyFactory.java:72)
      3 frames
    4. Hibernate
      AbstractEntityPersister.createProxy
      1. org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:402)
      2. org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3483)
      2 frames
    5. Hibernate
      SessionImpl.load
      1. org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:298)
      2. org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:219)
      3. org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
      4. org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905)
      5. org.hibernate.impl.SessionImpl.load(SessionImpl.java:822)
      6. org.hibernate.impl.SessionImpl.load(SessionImpl.java:815)
      6 frames
    6. Hibernate
      HibernateTemplate.load
      1. org.springframework.orm.hibernate3.HibernateTemplate$3.doInHibernate(HibernateTemplate.java:566)
      2. org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
      3. org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
      4. org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:560)
      5. org.springframework.orm.hibernate3.HibernateTemplate.load(HibernateTemplate.java:554)
      5 frames
    7. north.stardust2.core
      IndexCompositionDaoTest.findIndexCompositionByListedIndexAt
      1. north.stardust2.core.test.unit.dao.listed.IndexCompositionDaoTest.findIndexCompositionByListedIndexAt(IndexCompositionDaoTest.java:36)
      1 frame
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    9. JUnit
      Suite.run
      1. org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
      2. org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
      3. org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
      4. org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
      5. org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
      6. org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
      7. org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
      8. org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
      9. org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
      10. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
      11. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
      12. org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
      13. org.junit.internal.runners.CompositeRunner.runChildren(CompositeRunner.java:33)
      14. org.junit.runners.Suite.access$000(Suite.java:26)
      15. org.junit.runners.Suite$1.run(Suite.java:93)
      16. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
      17. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
      18. org.junit.runners.Suite.run(Suite.java:91)
      18 frames
    10. JUnit4 Runner
      JUnit4TestReference.run
      1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
      1 frame
    11. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      5 frames