java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(II Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

Hibernate JIRA | Dean Hiller | 9 years ago
  1. 0

    When I delete my asm.jar, I correctly get org/objectweb/asm/CodeVisitor java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor The above proves I don't accidentally have another version on the class path. Once I put the correct version of asm.jar from hibernate core back in, I get the following error.... [junit] org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/ String;[Ljava/lang/String;Ljava/lang/String;)V [junit] java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(II Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V [junit] at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java: 77) [junit] at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFacto ry.java:173) [junit] at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGe neratorStrategy.java:25) [junit] at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClass Generator.java:216) [junit] at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java :145) [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) [junit] at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) [junit] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyF actory(CGLIBLazyInitializer.java:117) [junit] at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstanti ate(CGLIBProxyFactory.java:43) [junit] at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFacto ry(PojoEntityTuplizer.java:162) [junit] at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(Abst ractEntityTuplizer.java:135) [junit] at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEnti tyTuplizer.java:55) [junit] at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping. <init>(EntityEntityModeToTuplizerMapping.java:56) [junit] at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetam odel.java:302) [junit] at org.hibernate.persister.entity.AbstractEntityPersister.<init> (AbstractEntityPersister.java:434) [junit] at org.hibernate.persister.entity.SingleTableEntityPersister.<in it>(SingleTableEntityPersister.java:109) [junit] at org.hibernate.persister.PersisterFactory.createClassPersister (PersisterFactory.java:55) [junit] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm pl.java:226) [junit] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura tion.java:1300) [junit] at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory (AnnotationConfiguration.java:859) [junit] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory (Ejb3Configuration.java:669) [junit] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFac tory(HibernatePersistence.java:126) [junit] at javax.persistence.Persistence.createEntityManagerFactory(Pers istence.java:51) [junit] at biz.xsoftware.rocketwar.server.test.AbstractHibTestCase.build SessionFactory(AbstractHibTestCase.java:51) [junit] at biz.xsoftware.rocketwar.server.test.AbstractHibTestCase.setUp Impl(AbstractHibTestCase.java:67) [junit] at biz.xsoftware.mock.testcase.MockTestCase.setUp(MockTestCase.j ava:52) [junit] at biz.xsoftware.mock.testcase.MockTestCase.runBare(MockTestCase .java:112) The manifest version of asm.jar is 1.5.3. The cglib is called cglib-2.1.3 but has not versoin in the manifest at all. I really don't know what is going on. Is it going through a special path of code that doesn't work and is a bug. I can't see how this can be user error right now since when I remove the asm.jar, I get classnotfound. It is interesting that the class not found is CodeVisitor while methodnot found is on Classvisitor. I am still looking into this but can't seem to figure out the bug completely.

    Hibernate JIRA | 9 years ago | Dean Hiller
    java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(II Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
  2. 0

    When I delete my asm.jar, I correctly get org/objectweb/asm/CodeVisitor java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor The above proves I don't accidentally have another version on the class path. Once I put the correct version of asm.jar from hibernate core back in, I get the following error.... [junit] org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/ String;[Ljava/lang/String;Ljava/lang/String;)V [junit] java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(II Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V [junit] at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java: 77) [junit] at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFacto ry.java:173) [junit] at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGe neratorStrategy.java:25) [junit] at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClass Generator.java:216) [junit] at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java :145) [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) [junit] at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) [junit] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyF actory(CGLIBLazyInitializer.java:117) [junit] at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstanti ate(CGLIBProxyFactory.java:43) [junit] at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFacto ry(PojoEntityTuplizer.java:162) [junit] at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(Abst ractEntityTuplizer.java:135) [junit] at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEnti tyTuplizer.java:55) [junit] at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping. <init>(EntityEntityModeToTuplizerMapping.java:56) [junit] at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetam odel.java:302) [junit] at org.hibernate.persister.entity.AbstractEntityPersister.<init> (AbstractEntityPersister.java:434) [junit] at org.hibernate.persister.entity.SingleTableEntityPersister.<in it>(SingleTableEntityPersister.java:109) [junit] at org.hibernate.persister.PersisterFactory.createClassPersister (PersisterFactory.java:55) [junit] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm pl.java:226) [junit] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura tion.java:1300) [junit] at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory (AnnotationConfiguration.java:859) [junit] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory (Ejb3Configuration.java:669) [junit] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFac tory(HibernatePersistence.java:126) [junit] at javax.persistence.Persistence.createEntityManagerFactory(Pers istence.java:51) [junit] at biz.xsoftware.rocketwar.server.test.AbstractHibTestCase.build SessionFactory(AbstractHibTestCase.java:51) [junit] at biz.xsoftware.rocketwar.server.test.AbstractHibTestCase.setUp Impl(AbstractHibTestCase.java:67) [junit] at biz.xsoftware.mock.testcase.MockTestCase.setUp(MockTestCase.j ava:52) [junit] at biz.xsoftware.mock.testcase.MockTestCase.runBare(MockTestCase .java:112) The manifest version of asm.jar is 1.5.3. The cglib is called cglib-2.1.3 but has not versoin in the manifest at all. I really don't know what is going on. Is it going through a special path of code that doesn't work and is a bug. I can't see how this can be user error right now since when I remove the asm.jar, I get classnotfound. It is interesting that the class not found is CodeVisitor while methodnot found is on Classvisitor. I am still looking into this but can't seem to figure out the bug completely.

    Hibernate JIRA | 9 years ago | Dean Hiller
    java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(II Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
  3. 0

    Error creating bean with name 'sessionFactory' defined in ServletContext resource-java¼¼Êõ

    lwfree.cn | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Org.springframework.beans.factory.BeanCreationException: Error creating bean with name - Front-end - GUJ

    com.br | 11 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

    3 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.NoSuchMethodError

      org.objectweb.asm.ClassVisitor.visit(II Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

      at net.sf.cglib.core.ClassEmitter.begin_class()
    2. Code Generation Library
      KeyFactory.create
      1. net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
      2. net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
      3. net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
      4. net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
      5. net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
      6. net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
      7. net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
      8. net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
      8 frames
    3. IDEA
      Enhancer.<clinit>
      1. net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
      1 frame