Announcement Announcement Module
Collapse
No announcement yet.
Caused by: java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDurin Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Caused by: java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDurin

    Hibernate 3.3.0 GA and spring 2.5.5
    Code:
    Caused by: java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
    	at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:126)
    	at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
    	at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
    	at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
    	at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
    	at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
    	at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302)
    	at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
    	at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
    	at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
    	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
    	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
    	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
    	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
    	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)

  • #2
    i had to use the latest cglib .

    Comment


    • #3
      Yes, it is right. I checked.

      Comment


      • #4
        What was the solution?

        What was the solution?
        I'm using spring 3.0.6 Release, with cglib 2.0.2.
        Getting the above NoSuchMethodError.
        I tried upgrading to cglib 2.2.2 but then I get different errors.
        Is there a specific version of spring + cglib that will definitely work?

        Comment


        • #5
          I wrote that I had the same problem and that I solved it with solution that was offered by some user who is above my first post.

          This dude said:

          "cablepuff
          i had to use the latest cglib . "

          I tried it and it helped me. And I put confirmation of this info.

          Thanks for the reading of my thought.

          Comment


          • #6
            Thanks.
            I tried the latest cglib (2.2.2), didn't help.
            I tried other versions as well (2.0.1, 2.0.2)... nothing worked. I got different exceptions.
            Finally I found a site specifying the dependency of the versions between spring+hibernate+cglib... plus I downloaded cglib-nodep jar which solved the problem...

            Thanks!

            Comment


            • #7
              Hi,

              I had similar kind of error:

              org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'pgSessionFactory' defined in ServletContext resource [/WEB-INF/servlet-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
              ...


              I tried the followings, nothing is helping:
              1. Used asm.jar and cglib-2.1.3.jar
              2. Used asm-all-3.3.jar and cglib-2.1.3.jar
              3. Used cglib-nodep-2.1_3.jar (with and without asm.jar, read that there could be some cross-purpose dependency issues between different asm jars).

              Here are the other jar files I am using:

              antlr-2.7.6.jar
              antlr-runtime-3.2.jar
              aopalliance-1.0.jar
              asm-all-3.3.jar
              cglib-2.1.3.jar
              commons-collections-3.1.jar
              commons-fileupload-1.2.1.jar
              commons-io-1.4.jar
              controldocs-database.jar
              dom4j-1.6.1.jar
              ejb3-persistence.jar
              hibernate-3.2.5.ga.jar
              hibernate-annotations.jar
              hibernate-commons-annotations.jar
              hibernate-core-3.3.1.GA.jar
              hibernate-validator-4.0.2.GA.jar
              hsqldb-1.8.0.1.jar
              javassist-3.4.GA.jar
              joda-time-1.6.2.jar
              json-lib-2.3-jdk15.jar
              jstl-1.1.2.jar
              jta-1.1.jar
              log4j-1.2.13.jar
              org.springframework.aop-3.1.0.RC1.jar
              org.springframework.asm-3.1.0.RC1.jar
              org.springframework.aspects-3.1.0.RC1.jar
              org.springframework.beans-3.1.0.RC1.jar
              org.springframework.context-3.1.0.RC1.jar
              org.springframework.context.support-3.1.0.RC1.jar
              org.springframework.core-3.1.0.RC1.jar
              org.springframework.expression-3.1.0.RC1.jar
              org.springframework.instrument-3.1.0.RC1.jar
              org.springframework.instrument.tomcat-3.1.0.RC1.jar
              org.springframework.jdbc-3.1.0.RC1.jar
              org.springframework.jms-3.1.0.RC1.jar
              org.springframework.orm-3.1.0.RC1.jar
              org.springframework.oxm-3.1.0.RC1.jar
              org.springframework.spring-library-3.1.0.RC1.libd
              org.springframework.test-3.1.0.RC1.jar
              org.springframework.transaction-3.1.0.RC1.jar
              org.springframework.web-3.1.0.RC1.jar
              org.springframework.web.portlet-3.1.0.RC1.jar
              org.springframework.web.servlet-3.1.0.RC1.jar
              org.springframework.web.struts-3.1.0.RC1.jar
              packtag.jar
              servlet-api-2.5.jar
              validation-api-1.0.0.GA.jar
              wjhk.jupload.jar

              Any help will be appreciated!
              Monologue

              Comment


              • #8
                I experienced the same issue. I removed cglib-2.1.3.jar and added cglib-nodep-2.1_3.jar in lib folder. It resolved my problem.

                Comment

                Working...
                X