net.sf.cglib.core.CodeGenerationException

java.lang.reflect.InvocationTargetException-->null

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web266

  • via GitHub by qifanyang
    ,
  • Stack trace

    • net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317) at org.spockframework.mock.runtime.ProxyBasedMockFactory$CglibMockFactory.createMock(ProxyBasedMockFactory.java:91) at org.spockframework.mock.runtime.ProxyBasedMockFactory.create(ProxyBasedMockFactory.java:49) at org.spockframework.mock.runtime.JavaMockFactory.create(JavaMockFactory.java:51) at org.spockframework.mock.runtime.CompositeMockFactory.create(CompositeMockFactory.java:44) at org.spockframework.lang.SpecInternals.createMock(SpecInternals.java:47) at org.spockframework.lang.SpecInternals.createMockImpl(SpecInternals.java:282) at org.spockframework.lang.SpecInternals.MockImpl(SpecInternals.java:99) at com.package.MySpec.$spock_initializeFields(MySpec.groovy:28) Caused by: java.lang.reflect.InvocationTargetException at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219) ... 10 more Caused by: java.lang.ClassFormatError: Invalid method Code length 67622 in class file com.package.MyClass$$EnhancerByCGLIB$$281952b3_4 at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ... 12 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitor2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    13 more bugmates