NoClassDefFoundError:带有回送的org/slf4j/LoggerFactory [英] NoClassDefFoundError: org/slf4j/LoggerFactory with logback

查看:111
本文介绍了NoClassDefFoundError:带有回送的org/slf4j/LoggerFactory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助

在过去的几天里,我一直在尝试让Logback 1.1.3与我的Bukkit插件配合使用.作为参考,我的pom.xml包括以下几行:

For the past couple of days I have been trying to get Logback 1.1.3 to work with my Bukkit plugin. For reference my pom.xml includes these lines:

<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-core</artifactId>
    <version>1.1.3</version>
</dependency>
<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>1.1.3</version>
</dependency>

"Maven依赖关系"下列出了以下jar:

And the following jars are listed under "Maven Dependencies":

  • logback-core-1.1.3.jar
  • logback-classic-1.1.3,jar
  • slf4j-api-1.7.7.jar(突然出现)

可以在此处找到服务器控制台生成的堆栈跟踪(MoneyDrops.java的第29行是: private static final Logger LOGGER = LoggerFactory.getLogger("MoneyDropsLogger");).

The stacktrace that the server console produces can be found here (line 29 of MoneyDrops.java is: private static final Logger LOGGER = LoggerFactory.getLogger("MoneyDropsLogger");).

我也搜索了stackoverflow,但是所有答案都表明我需要提供一个使用SLF4J api的实现(例如log4j),但是据我了解,logback本机实现了该api,但我没有需要另一个jar文件.

I have also searched through stackoverflow but all the answers suggest that I need to provide an implementation that use the SLF4J api (such as log4j), however, it is to my understanding that logback natively implements the api and that I do not need another jar file.

任何帮助将不胜感激.

推荐答案

谢谢大家的帮助!我得出的结论是,无论如何我实际上都不需要登录插件(它并不那么繁重),而是选择将其完全删除并依靠Bukkit logger代替.再次感谢大家的帮助.

Thank you all for your help! I have concluded that I do not actually need logging in my plugin anyway (it is not that heavy) and have opted to remove it completely and rely on the Bukkit logger instead. Again, thank you all for your help.

这篇关于NoClassDefFoundError:带有回送的org/slf4j/LoggerFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆