NoSuchMethodError--slf4j的版本出现冲突

来源:互联网 发布:linux移动目录 编辑:程序博客网 时间:2024/05/16 03:21

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.apache.http.client.protocol.RequestAuthCache.process(RequestAuthCache.java:75)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:131)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:193)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)

URL urlOfClass =ClassPathXmlApplicationContext.class.getClassLoader().getResource(“org/slf4j/spi/LocationAwareLogger.class”);
System.out.println(urlOfClass);

解决:将myeclipse自带的Jee 6 library 移除就可以了

1 0
原创粉丝点击