Java myeclipse中jar包冲突,不过已经找到冲突jar文件,接下来该如何解决?

同一派 发布于 2015/04/20 22:38
阅读 2K+
收藏 0

做junit测试时,出现异常,java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
at org.springframework.core.env.MutablePropertySources.addLast(MutablePropertySources.java:104)
at org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:78)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:117)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.<init>(AbstractBeanDefinitionReader.java:57)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.<init>(XmlBeanDefinitionReader.java:135)
at org.activiti.engine.impl.cfg.BeansConfigurationHelper.parseProcessEngineConfiguration(BeansConfigurationHelper.java:33)
at org.activiti.engine.impl.cfg.BeansConfigurationHelper.parseProcessEngineConfigurationFromResource(BeansConfigurationHelper.java:48)
at org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(ProcessEngineConfiguration.java:181)
at org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(ProcessEngineConfiguration.java:177)
at test.ActivitiDBCreate.createTable(ActivitiDBCreate.java:29)
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文件为com.genuitec.eclipse.j2eedt.core_11.5.0.me201311281640/data/libraryset/EE_6/bean-validator.jar!/org/slf4j/spi/LocationAwareLogger.class,请问,之后该如何解决冲突问题?

加载中
0
我是一名程序员
我是一名程序员
既然找到那就删掉其中之一
0
同一派
删掉之后又会提示和其他的jar文件冲突
0
刘柳
刘柳

10以前选择 窗口-》首选项=》myeclipse ,找到左侧的project capitalbilities,然后冲突的包属于哪个组,然后右侧有个remove.

2014的话 在同样的位置,找到那个组,下面有个enable advanced configuration,勾上后就可以选择不加载那个jar.

0
同一派

引用来自“刘柳”的评论

10以前选择 窗口-》首选项=》myeclipse ,找到左侧的project capitalbilities,然后冲突的包属于哪个组,然后右侧有个remove.

2014的话 在同样的位置,找到那个组,下面有个enable advanced configuration,勾上后就可以选择不加载那个jar.

试过了,可是为什么还是不行呢,还是报同样的异常
返回顶部
顶部