2 qq 28108539 qq_28108539 于 2015.06.05 16:46 提问

报错如下org.slf4j.MDC.getCopyOfContextMap

java.lang.NoSuchMethodError: org.slf4j.MDC.getCopyOfContextMap()Ljava/util/Map;
at org.apache.activemq.util.MDCHelper.getCopyOfContextMap(MDCHelper.java:30)
at org.apache.activemq.thread.PooledTaskRunner.(PooledTaskRunner.java:42)
at org.apache.activemq.thread.TaskRunnerFactory.createTaskRunner(TaskRunnerFactory.java:80)
at org.apache.activemq.ActiveMQSessionExecutor.wakeup(ActiveMQSessionExecutor.java:101)
at org.apache.activemq.ActiveMQMessageConsumer.start(ActiveMQMessageConsumer.java:1339)
at org.apache.activemq.ActiveMQMessageConsumer.(ActiveMQMessageConsumer.java:261)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1116)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1060)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:973)
at org.springframework.jms.core.JmsTemplate.createConsumer(JmsTemplate.java:993)
at org.springframework.jms.core.JmsTemplate.doReceive(JmsTemplate.java:722)
at org.springframework.jms.core.JmsTemplate$9.doInJms(JmsTemplate.java:697)
at org.springframework.jms.core.JmsTemplate$9.doInJms(JmsTemplate.java:695)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
at org.springframework.jms.core.JmsTemplate.receiveSelected(JmsTemplate.java:695)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:677)
at com.pis.activeMQ.test.MessageReceiver.Receive(MessageReceiver.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

执行程序就报下面的错误-说是jar包冲突-可是我已经删掉了-还是在报这个错误-谁能为我解答一下-非常感谢

1个回答

bulusli3
bulusli3   Ds   Rxr 2015.06.05 17:09

不是包冲突,而是你的jar包版本有问题,导致这个方法org.slf4j.MDC.getCopyOfContextMap()不存在,建议你找个完整的jar包放进去或者存在这个方法的包。

Csdn user default icon
上传中...
上传图片
插入图片