NoSuchMethodError--slf4j的版本出现冲突

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 移除就可以了

你可能感兴趣的:(NoSuchMethodError--slf4j的版本出现冲突)