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

Spring JIRA | Narasimha | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  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 | 2 years ago | Buhake Sindi
    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

    java.lang.VerifyError: Inconsistent stackmap frames at branch target 421

    Stack Overflow | 1 year ago | Shanaka Kuruwita
    java.lang.VerifyError: Inconsistent stackmap frames at branch target 421 Exception Details: Location: it/codegen/tbx/search/service/TravelBoxSearch.convertQuoteItemsEx(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lit/codegen/CGError; @421: getstatic Reason: Type 'it/codegen/CGResponse' (current frame, locals[5]) is not assignable to 'it/codegen/CGError' (stack map, locals[5]) Current Frame: bci: @58 flags: { } locals: { 'it/codegen/tbx/search/service/TravelBoxSearch', 'java/lang/String', 'java/lang/String', 'java/util/List', 'it/codegen/logging/TimeLogger', 'it/codegen/CGResponse', 'it/codegen/tbx/search/service/ShoppingBasket' } stack: { 'it/codegen/tbx/search/service/ShoppingBasket' } Stackmap Frame: bci: @421 flags: { } locals: { 'it/codegen/tbx/search/service/TravelBoxSearch', 'java/lang/String', 'java/lang/String', 'java/util/List', 'it/codegen/logging/TimeLogger', 'it/codegen/CGError', 'it/codegen/tbx/search/service/ShoppingBasket' } stack: { } Bytecode: 0x0000000: 013a 04b2 0127 9900 15bb 01a4 59b8 01a5 0x0000010: b601 a6b8 01a7 b701 a83a 04b8 0222 2cb6 0x0000020: 0223 bb07 d759 1402 1213 07d8 b707 d93a 0x0000030: 052a 2cb7 02b0 3a06 1906 c601 6b19 06b6 0x0000040: 02b1 3a07 1907 c601 452d c601 272d b902 0x0000050: 4e01 009a 011e bb01 cc59 b701 cd3a 082d 0x0000060: b902 3201 003a 0919 09b9 0233 0100 9900 0x0000070: 4a19 09b9 0234 0100 c002 353a 0a19 0ac6 0x0000080: 0036 190a b602 3ac6 002e 1908 bb00 3f59 0x0000090: b700 4019 0ab6 023a b602 a4b6 0042 190a 0x00000a0: b602 3ab6 023b b602 4cb6 0043 190a b602 0x00000b0: 3ab6 011d 57a7 ffb2 1907 b603 cfc6 0079 0x00000c0: 1907 b603 cfb9 0232 0100 3a09 1909 b902 0x00000d0: 3301 0099 0063 1909 b902 3401 00c0 02cf 0x00000e0: 3a0a 190a c600 4f19 08bb 003f 59b7 0040 0x00000f0: 190a b604 1db6 0042 190a b605 81b6 024c 0x0000100: b600 43b6 01e0 9900 2d19 08bb 003f 59b7 0x0000110: 0040 190a b604 1db6 0042 190a b605 81b6 0x0000120: 024c b600 43b6 01e1 c007 c819 0ab6 07da 0x0000130: b607 dba7 ff99 2a2b 2db6 07c7 3a09 1909 0x0000140: b602 8599 002b b200 29b8 0038 b200 3913 0x0000150: 07dc b600 3b2a 1909 1907 1906 b707 dd3a 0x0000160: 0519 0619 05b6 02ac c002 adb6 02c4 a700 0x0000170: 34b2 0029 b800 38b2 0039 1307 deb6 003b 0x0000180: 1905 1307 dfb6 027a a700 1ab2 0029 b800 0x0000190: 38b2 0039 1307 e0b6 003b 1905 1307 e1b6 0x00001a0: 027a a700 1ab2 0029 b800 38b2 0039 1303 0x00001b0: feb6 003b 1905 1307 e2b6 027a 1905 3a07 0x00001c0: b201 2799 0008 1904 b601 b619 07b0 3a0b 0x00001d0: b201 2799 0008 1904 b601 b619 0bbf Exception Handler Table: bci [27, 448] => handler: 462 bci [462, 464] => handler: 462 Stackmap Table: append_frame(@27,Object[#3374]) full_frame(@103,{Object[#3339],Object[#3359],Object[#3359],Object[#3375],Object[#3374],Object[#3451],Object[#3623],Object[#3624],Object[#3478],Object[#3480]},{}) same_frame_extended(@181) chop_frame(@184,1) append_frame(@204,Object[#3480]) same_frame_extended(@307) chop_frame(@310,1) chop_frame(@366,1) same_frame(@369) same_frame(@395) chop_frame(@418,1) same_frame(@421) same_frame(@444) append_frame(@459,Object[#3451]) full_frame(@462,{Object[#3339],Object[#3359],Object[#3359],Object[#3375],Object[#3374]},{Object[#3344]}) full_frame(@475,{Object[#3339],Object[#3359],Object[#3359],Object[#3375],Object[#3374],Top,Top,Top,Top,Top,Top,Object[#3344]},{})
  6. 0

    GitHub comment 181#153339797

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

  1. esaar 1 times, last 9 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