0
在我的項目中,我使用Hibernate3(取決於slf4j-1.6)和RESTeasy(取決於slf4j-1.5)。兩者都不兼容,並在運行時發生錯誤。SLF4J:Hibernate3與RESTeasy
SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
at org.slf4j.impl.SimpleLogger.formatAndLog(SimpleLogger.java:222)
at org.slf4j.impl.SimpleLogger.info(SimpleLogger.java:258)
at org.hibernate.annotations.common.Version.<clinit>(Version.java:37)
任何想法來解決這個衝突?
好的,現在就得到這個。我只在類路徑中保留1.5,而hibernate直接使用log4j。 – PeterMmm 2010-11-04 14:17:59