java.lang.IllegalStateException: Unknown callback class org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor

Spring JIRA | Matthew Sgarlata | 1 decade ago
  1. 0

    I tried to upgrade from Spring 1.0.2 to Spring 1.1 RC2 and it appears the two releases aren't 100% compatible. I changed nothing in my application context but now it won't load. It looks like the problem is with some of the AOP magic that I don't understand, but I should know enough to include the information you need to diagnose the problem. Let me know if you need more info; I will be checking email. First, the error: ERROR [main] (SpringInitializer.java:146) - Unable to load Spring application context java.lang.IllegalStateException: Unknown callback class org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor at net.sf.cglib.proxy.CallbackUtils.getGenerator(CallbackUtils.java:102) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:298) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:246) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:175) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:138) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:66) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:260) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:182) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:285) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:114) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:96) at com.bah.krm.core.SpringInitializer.initForDb(SpringInitializer.java:140) Here is where I use AOP (taken straight from the user's manual): <bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager"> <property name="sessionFactory"><ref bean="sessionFactory"/></property> </bean> <bean id="matchAllTxInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager"><ref bean="transactionManager"/></property> <property name="transactionAttributeSource"><ref bean="matchAllWithPropReq"/></property> </bean> <bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="proxyTargetClass"> <value>true</value> </property> <property name="interceptorNames"> <list> <value>matchAllTxInterceptor</value> </list> </property> <property name="beanNames"> <list> <value>test</value> </list> </property> </bean> <bean id="test" class="Test" autowire="byName"/>

    Spring JIRA | 1 decade ago | Matthew Sgarlata
    java.lang.IllegalStateException: Unknown callback class org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor
  2. 0

    I tried to upgrade from Spring 1.0.2 to Spring 1.1 RC2 and it appears the two releases aren't 100% compatible. I changed nothing in my application context but now it won't load. It looks like the problem is with some of the AOP magic that I don't understand, but I should know enough to include the information you need to diagnose the problem. Let me know if you need more info; I will be checking email. First, the error: ERROR [main] (SpringInitializer.java:146) - Unable to load Spring application context java.lang.IllegalStateException: Unknown callback class org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor at net.sf.cglib.proxy.CallbackUtils.getGenerator(CallbackUtils.java:102) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:298) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:246) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:175) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:138) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:66) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:260) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:182) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:285) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:114) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:96) at com.bah.krm.core.SpringInitializer.initForDb(SpringInitializer.java:140) Here is where I use AOP (taken straight from the user's manual): <bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager"> <property name="sessionFactory"><ref bean="sessionFactory"/></property> </bean> <bean id="matchAllTxInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager"><ref bean="transactionManager"/></property> <property name="transactionAttributeSource"><ref bean="matchAllWithPropReq"/></property> </bean> <bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="proxyTargetClass"> <value>true</value> </property> <property name="interceptorNames"> <list> <value>matchAllTxInterceptor</value> </list> </property> <property name="beanNames"> <list> <value>test</value> </list> </property> </bean> <bean id="test" class="Test" autowire="byName"/>

    Spring JIRA | 1 decade ago | Matthew Sgarlata
    java.lang.IllegalStateException: Unknown callback class org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor
  3. 0

    I tried to set proxyTargetClass to true for BeanNameAutoProxyCreator, but it gave me the following error. It's running fine if I turned proxyTargetClass back to false and created an interface for my pojo class. ========================= [8/30/04 11:47:10:094 EDT] 4dc3d1da ExceptionUtil X CNTR0019E: Non-application exception occurred while processing method purchase: com.ibm.ejs.container.CreateFailureException: java.lang.reflect.InvocationTargetException; nested exception is: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cot.esd.TestSpringSBBean' defined in URL [file:/C:/projects/TestJ2EE/TestJ2EEEjb/bin/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'purchaseManager' defined in class path resource [com/cot/esd/springContext.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'purchaseManager' defined in class path resource [com/cot/esd/springContext.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'purchaseManager' defined in class path resource [com/cot/esd/springContext.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null java.lang.IllegalStateException: Callback Lnet/sf/cglib/proxy/MethodInterceptor; is not assignable to Lnet/sf/cglib/proxy/MethodInterceptor; at net.sf.cglib.proxy.Enhancer.validate(Enhancer.java:374) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:399) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:318) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:175) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:138) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:66) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:260) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:182) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:285) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65) at java.lang.reflect.Constructor.newInstance(Native Method) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:71) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:66) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:470) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:247) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:83) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:68) at org.springframework.context.access.ContextSingletonBeanFactoryLocator.createDefinition(ContextSingletonBeanFactoryLocator.java:112) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:385) at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:115) at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.container.StatelessBeanO.<init>(StatelessBeanO.java:114) at com.ibm.ejs.container.BMStatelessBeanO.<init>(BMStatelessBeanO.java:32) at com.ibm.ejs.container.BMStatelessBeanOFactory.create(BMStatelessBeanOFactory.java:17) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:464) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:548) at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:66) at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:186) at com.ibm.ejs.container.EJSContainer.preInvoke(EJSContainer.java:1646)

    Spring JIRA | 1 decade ago | Victor
    java.lang.IllegalStateException: Callback Lnet/sf/cglib/proxy/MethodInterceptor; is not assignable to Lnet/sf/cglib/proxy/MethodInterceptor;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I tried to set proxyTargetClass to true for BeanNameAutoProxyCreator, but it gave me the following error. It's running fine if I turned proxyTargetClass back to false and created an interface for my pojo class. ========================= [8/30/04 11:47:10:094 EDT] 4dc3d1da ExceptionUtil X CNTR0019E: Non-application exception occurred while processing method purchase: com.ibm.ejs.container.CreateFailureException: java.lang.reflect.InvocationTargetException; nested exception is: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cot.esd.TestSpringSBBean' defined in URL [file:/C:/projects/TestJ2EE/TestJ2EEEjb/bin/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'purchaseManager' defined in class path resource [com/cot/esd/springContext.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'purchaseManager' defined in class path resource [com/cot/esd/springContext.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'purchaseManager' defined in class path resource [com/cot/esd/springContext.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null java.lang.IllegalStateException: Callback Lnet/sf/cglib/proxy/MethodInterceptor; is not assignable to Lnet/sf/cglib/proxy/MethodInterceptor; at net.sf.cglib.proxy.Enhancer.validate(Enhancer.java:374) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:399) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:318) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:175) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:138) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:66) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:260) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:182) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:285) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65) at java.lang.reflect.Constructor.newInstance(Native Method) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:71) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:66) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:470) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:247) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:83) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:68) at org.springframework.context.access.ContextSingletonBeanFactoryLocator.createDefinition(ContextSingletonBeanFactoryLocator.java:112) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:385) at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:115) at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.container.StatelessBeanO.<init>(StatelessBeanO.java:114) at com.ibm.ejs.container.BMStatelessBeanO.<init>(BMStatelessBeanO.java:32) at com.ibm.ejs.container.BMStatelessBeanOFactory.create(BMStatelessBeanOFactory.java:17) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:464) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:548) at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:66) at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:186) at com.ibm.ejs.container.EJSContainer.preInvoke(EJSContainer.java:1646)

    Spring JIRA | 1 decade ago | Victor
    java.lang.IllegalStateException: Callback Lnet/sf/cglib/proxy/MethodInterceptor; is not assignable to Lnet/sf/cglib/proxy/MethodInterceptor;
  6. 0

    general - Re: [GHC] #12195: RTS GetTime.c is broken on Darwins that include clock_gettime - msg#19365 - Recent Discussion OSDir.com

    osdir.com | 4 months ago
    java.lang.IllegalStateException: problem in scala.concurrent internal callback

    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.IllegalStateException

      Unknown callback class org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor

      at net.sf.cglib.proxy.CallbackUtils.getGenerator()
    2. IDEA
      Enhancer.create
      1. net.sf.cglib.proxy.CallbackUtils.getGenerator(CallbackUtils.java:102)
      2. net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:298)
      3. net.sf.cglib.proxy.Enhancer.create(Enhancer.java:246)
      3 frames
    3. Spring AOP
      AbstractAutoProxyCreator.postProcessAfterInitialization
      1. org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:175)
      2. org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:138)
      3. org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:66)
      4. org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:260)
      4 frames
    4. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:182)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:285)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:204)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:135)
      6. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:223)
      6 frames
    5. Spring Context
      FileSystemXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284)
      2. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:114)
      3. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:96)
      3 frames
    6. com.bah.krm
      SpringInitializer.initForDb
      1. com.bah.krm.core.SpringInitializer.initForDb(SpringInitializer.java:140)
      1 frame