SLF4J错误

SLF4J: The requested version 1.6 by your slf4j binding is not compatible with [1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
Exception in thread "main" 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.info(SLF4JLocationAwareLog.java:159)
at org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:456)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:394)
at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
at main.Run.main(Run.java:33)

前些天在写一个基于JMS的程序时报这个错误,开始编译阶段还好好的,后来打包发布的时候就出现这个问题,后来发现是activemq-all-5.5.0.jar里面包含了一个SLF4J的旧版本的class。后来删除里面的slf4j就没有出现这个情况了,如果你也遇到了类似的错误,不妨找找是不是你的其他的jar包里面包含了slf4j低版本的class或者jar。

你可能感兴趣的:(java,apache,thread,activemq,jms)