slf4j 石英异常

发布于 2024-10-22 18:47:01 字数 1089 浏览 12 评论 0原文

我正在尝试在项目的一个简单示例中使用石英。我收到以下异常,我不确定这意味着什么...但是我在 POM 文件中将 slf4j 更新为 1.6.1,即使这样仍然出现,

    SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
    at org.quartz.impl.StdSchedulerFactory.<init>(StdSchedulerFactory.java:249)
............

对此的任何帮助将不胜感激。谢谢。

I am trying to use quartz in a simple example in project. I am getting the following exception, I am not sure what it means...However I updated my slf4j to 1.6.1 in my POM file even then this still appears,

    SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
    at org.quartz.impl.StdSchedulerFactory.<init>(StdSchedulerFactory.java:249)
............

Any help on this would be highly appreciated. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

指尖上的星空 2024-10-29 18:47:01

您需要所有 SLF4J 依赖项才能使用相同的版本。

SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x

如果你查看你的依赖树,我希望你会发现不止一个版本的 SLF4J 用于它使用的各种 jar。

例如

[INFO] +- org.hibernate:hibernate-core:jar:3.5.3-Final:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile (version managed from 2.7.6)
[INFO] |  \- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.5.8:compile

,这里两个 slf4j dep 具有相同的版本。

You need all your SLF4J dependencies to use the same version.

SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x

If you look at your dependency tree, I expect that you'll find more then one version of SLF4J for the various jar it uses.

For example

[INFO] +- org.hibernate:hibernate-core:jar:3.5.3-Final:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile (version managed from 2.7.6)
[INFO] |  \- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.5.8:compile

Here the two slf4j deps have the same version.

总以为 2024-10-29 18:47:01

看起来石英内部使用的 SLF4J 绑定太旧了。您应该从quartz 中排除旧版本,并明确地将新版本添加到您的项目中。运行 mvn dependency:tree 并在此处发布您的结果。那时我就​​能给你准确的指示。

Looks like the SLF4J binding used inside quartz is too old. You should exclude the old version from quartz and add a new one explicitly to your project. Run mvn dependency:tree and post your result here. I will be able to give you exact instructions then.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文