java.lang.NoSuchMethodError: org.apache.log4j.MDC.put(Ljava/lang/String;Ljava/lang/String;)V

Stack Overflow | Daryl | 5 months ago
  1. 0

    Sonarqube 5.6 code analysis failed in mac os

    Stack Overflow | 5 months ago | Daryl
    java.lang.NoSuchMethodError: org.apache.log4j.MDC.put(Ljava/lang/String;Ljava/lang/String;)V
  2. 0

    Bug 1181487 – zookeeper service fails to start

    redhat.com | 1 year ago
    java.lang.NoSuchMethodError: org.apache.log4j.MDC.put(Ljava/lang/String;Ljava/lang/String;)V
  3. 0

    ServerLog : sonarQube server doesn't show analysis

    Stack Overflow | 8 months ago | Florian Michel
    java.lang.NoSuchMethodError: org.apache.log4j.MDC.put(Ljava/lang/String;Ljava/lang/String;)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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
  6. 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

    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.apache.log4j.MDC.put(Ljava/lang/String;Ljava/lang/String;)V

      at org.sonar.ce.log.CeLogging.initForTask()
    2. org.sonar.ce
      CeLogging.initForTask
      1. org.sonar.ce.log.CeLogging.initForTask(CeLogging.java:107)[sonar-server-5.6.jar:na]
      1 frame
    3. org.sonar.server
      CeWorkerCallableImpl.call
      1. org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:72)[sonar-server-5.6.jar:na]
      2. org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56)[sonar-server-5.6.jar:na]
      3. org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35)[sonar-server-5.6.jar:na]
      3 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_101]
      2. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[na:1.8.0_101]
      3. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_101]
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[na:1.8.0_101]
      5. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[na:1.8.0_101]
      6. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_101]
      7. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_101]
      8. java.lang.Thread.run(Thread.java:745)[na:1.8.0_101]
      8 frames