代码之家  ›  专栏  ›  技术社区  ›  PeterMmm

SLF4J:Hibernate3与RESTeasy

  •  0
  • PeterMmm  · 技术社区  · 15 年前

    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 回复  |  直到 15 年前
        1
  •  1
  •   3urdoch    15 年前

    我不熟悉RESTeasy,但是我以前遇到过这个问题,我刚刚将所有slf4jjar更新到了更高版本,发现我使用的依赖于旧版本的api仍然在1.6版本上工作。

    试一试,试试也没什么坏处。

    编辑:我只想说,确保将slf4j api(slf4j-api-1.x.x.jar)和插件(例如slf4j-log4j12-1.x.x.jar)更新到同一版本。