java.lang.VerifyError: (class: XXXServiceSpringMvc$$EnhancerBySpringCGLIB$$744256ce, method: <init> signature: ()V) Illegal type in constant pool

Spring JIRA | Narasimha | 2 years ago
  1. 0

    Hi, Recently we migrated our project from Spring 3.X to Spring 4.0.9. We did this upgradation for Java8 support and Tomcat 7.0.59 support. And currently migrating the project to full Spring MVC. We have a requirement like some of our controllers might night be instantiated out of Spring. For that we have used @Configurable annotation. Everything is working fine so far. Now the requirement came like we need to introduce an aspect to do some operation dynamically. For example we need to execute a method on the target object when a particular annotation is available on the method. We are using LoadTimeWeaving , I did all configuration as per spring documents. But whenever I am starting the server I am getting the following error. java.lang.VerifyError: (class: XXXServiceSpringMvc$$EnhancerBySpringCGLIB$$744256ce, method: <init> signature: ()V) Illegal type in constant pool at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:386) at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219) at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:317) at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:57) at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:202) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:496) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:381) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:341) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:421) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1559) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

    Spring JIRA | 2 years ago | Narasimha
    java.lang.VerifyError: (class: XXXServiceSpringMvc$$EnhancerBySpringCGLIB$$744256ce, method: <init> signature: ()V) Illegal type in constant pool
  2. 0

    Hi, Recently we migrated our project from Spring 3.X to Spring 4.0.9. We did this upgradation for Java8 support and Tomcat 7.0.59 support. And currently migrating the project to full Spring MVC. We have a requirement like some of our controllers might night be instantiated out of Spring. For that we have used @Configurable annotation. Everything is working fine so far. Now the requirement came like we need to introduce an aspect to do some operation dynamically. For example we need to execute a method on the target object when a particular annotation is available on the method. We are using LoadTimeWeaving , I did all configuration as per spring documents. But whenever I am starting the server I am getting the following error. java.lang.VerifyError: (class: XXXServiceSpringMvc$$EnhancerBySpringCGLIB$$744256ce, method: <init> signature: ()V) Illegal type in constant pool at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:386) at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219) at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:317) at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:57) at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:202) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:496) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:381) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:341) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:421) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1559) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

    Spring JIRA | 2 years ago | Narasimha
    java.lang.VerifyError: (class: XXXServiceSpringMvc$$EnhancerBySpringCGLIB$$744256ce, method: <init> signature: ()V) Illegal type in constant pool
  3. 0

    java.lang.VerifyError: org/primefaces/behavior/confirm/ConfirmBehaviorHandler Wrong return type in function

    Stack Overflow | 1 year ago | Buhake Sindi
    java.lang.RuntimeException: java.lang.RuntimeException: java.lang.VerifyError: (class: org/primefaces/behavior/confirm/ConfirmBehaviorHandler, method: createBehavior signature: (Ljavax/faces/view/facelets/FaceletContext;Ljava/lang/String;)Lorg/primefaces/behavior/base/AbstractBehavior;) Wrong return type in function
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 181#153339797

    GitHub | 1 year ago | AbhishekPuligundla
    java.lang.reflect.InvocationTargetException
  6. 0

    scala's StringBuilder and -XX:+OptimizeStringConcat

    Google Groups | 1 year ago | Simon Ochsenreither
    java.lang.VerifyError: Bad type on operand stack Exception Details: Location: scala/tools/ant/ScalaTool.scala$tools$ant$ScalaTool$$$anonfun$2(Ljava/lang/String;Ljava/lang/String;)Lscala/collection/immutable/List; @98: invokevirtual Reason: Type 'scala/collection/mutable/StringBuilder' (current frame, stack[1]) is not assignable to 'java/lang/StringBuilder' Current Frame: bci: @98 flags: { } locals: { 'scala/tools/ant/ScalaTool', 'java/lang/String', 'java/lang/String', 'java/lang/String' } stack: { 'scala/tools/ant/ScalaTool', 'scala/collection/mutable/StringBuilder', 'java/lang/String' } Bytecode: 0x0000000: 2cb6 00e9 4e2a b602 422d b602 469a 0006 0x0000010: a700 432b 12f1 3a04 59c6 0006 a700 0c57 0x0000020: 1904 c600 2ba7 000e 1904 b601 8f9a 0020 0x0000030: a700 03b2 00b5 b200 8104 bd00 8559 032d 0x0000040: 53c0 008b b602 14b6 0249 a700 06b2 024e 0x0000050: a700 222a bb01 9159 b701 9213 0250 b601 0x0000060: 952d b601 9513 0252 b601 95b6 0196 b601 0x0000070: d9bf b0 Stackmap Table: append_frame(@19,Object[#133]) full_frame(@31,{Object[#2],Object[#133],Object[#133],Object[#133],Object[#133]},{Object[#133]}) same_locals_1_stack_item_frame(@40,Object[#133]) same_frame(@51) same_frame(@77) same_locals_1_stack_item_frame(@80,Object[#187]) chop_frame(@83,1) full_frame(@114,{Object[#2],Object[#133],Object[#133],Object[#133],Object[#133]},{Object[#187]})

  1. esaar 1 times, last 4 months ago
11 unregistered visitors
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.VerifyError

    (class: XXXServiceSpringMvc$$EnhancerBySpringCGLIB$$744256ce, method: <init> signature: ()V) Illegal type in constant pool

    at java.lang.Class.forName0()
  2. Java RT
    Class.forName
    1. java.lang.Class.forName0(Native Method)
    2. java.lang.Class.forName(Class.java:348)
    2 frames
  3. Spring Core
    Enhancer.createClass
    1. org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:386)
    2. org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
    3. org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
    4. org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
    4 frames
  4. Spring AOP
    AbstractAutoProxyCreator.postProcessAfterInitialization
    1. org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:57)
    2. org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:202)
    3. org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109)
    4. org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:496)
    5. org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:381)
    6. org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:341)
    6 frames
  5. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:421)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1559)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    9. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
    9 frames
  6. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    2 frames
  7. Spring MVC
    HttpServletBean.init
    1. org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
    2. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624)
    3. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672)
    4. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543)
    5. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
    6. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    6 frames
  8. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)
    1 frame
  9. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    2. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    3. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    4. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262)
    5. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550)
    6. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    7. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    8. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    8 frames
  10. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames