Announcement Announcement Module
Collapse
No announcement yet.
CGLIB Error: Lnet/sf/cglib/proxy/MethodInterceptor; Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • CGLIB Error: Lnet/sf/cglib/proxy/MethodInterceptor;

    Hi All,

    I'm facing sever problems using Spring with Hibernate.

    I get this error on Servlet strartup

    11:28:57,828 ERROR ContextLoader:172 - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionForRandomizer' defined in ServletContext resource [/WEB-INF/applicationContext.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:3 18)
    at org.springframework.aop.framework.Cglib2AopProxy.g etProxy(Cglib2AopProxy.java:176)
    at org.springframework.aop.framework.Cglib2AopProxy.g etProxy(Cglib2AopProxy.java:137)
    at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.java:66)
    at org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean.afterPropertiesSet(Transacti onProxyFactoryBean.java:237)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1065)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:343)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:260)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:276)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:317)
    at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:131)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:224)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:150)
    at org.springframework.web.context.ContextLoaderServl et.init(ContextLoaderServlet.java:81)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:211)
    ...

    I am using regular Hibernate Transaction manager, is it the problem with older version of CGLIB?

    Thanks in advance
    Nirav

  • #2
    CGLIB Error: Lnet/sf/cglib/proxy/MethodInterceptor;

    Stupid Me,

    It was that simple as I was using older version of CGLIB, i replaced jar and now it's working.

    Comment

    Working...
    X