类路径包含多个 SLF4J 绑定 [英] Class path contains multiple SLF4J bindings

查看:38
本文介绍了类路径包含多个 SLF4J 绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用服务器 ibm websphere.我在应用程序服务器日志中收到以下错误.我在哪里可以设置 websphere?

My application server ibm websphere. I'm getting the following error in the application server logs. Where can I websphere settings?

[19.09.2012 14:56:54:940 EEST] 0000000a SystemErr R SLF4J:类路径包含多个 SLF4J 绑定.
[19.09.2012 14:56:54:940 EEST] 0000000a SystemErr R SLF4J:在 [wsjar:file:/C:/Lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder 中找到绑定.class]
[19.09.2012 14:56:54:941 EEST] 0000000a SystemErr R SLF4J:发现绑定[bundleresource://217.fwk37356669:1/org/slf4j/impl/StaticLoggerBinder.class]
[19.09.2012 14:56:54:941 EEST] 0000000a SystemErr R SLF4J:参见 http://www.slf4j.org/codes.html#multiple_bindings 的解释.

[19.09.2012 14:56:54:940 EEST] 0000000a SystemErr R SLF4J: Class path contains multiple SLF4J bindings.
[19.09.2012 14:56:54:940 EEST] 0000000a SystemErr R SLF4J: Found binding in [wsjar:file:/C:/Lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[19.09.2012 14:56:54:941 EEST] 0000000a SystemErr R SLF4J: Found binding in [bundleresource://217.fwk37356669:1/org/slf4j/impl/StaticLoggerBinder.class]
[19.09.2012 14:56:54:941 EEST] 0000000a SystemErr R SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

推荐答案

不幸的是,websphere 在自己的安装中有很多常用的库.它们经常与您要在应用程序中使用的版本冲突.

unfortunately, websphere has a lot of commonly used libraries in its own installation. They often conflict with the versions you want to use in your application.

选项是从应用程序中删除库 jar 并使用 websphere 提供的内容或将类加载器设置更改为父最后"以确保首先找到与应用程序捆绑的库.(这不会消除 slf4j 警告,但会确保使用您的实现).

The options are to remove the library jars from the application and use what websphere provides or change the class loader settings to 'parent last' to make sure the libs bundled with the app are found first. (this will not eliminate the slf4j warning, but will make sure your implementation is used).

抱歉,我无法提供更多设置的详细信息(这是我上次使用 websphere 的几年).

Sorry, I can't give more details where the settings are found (its a few years that I last worked with websphere).

这篇关于类路径包含多个 SLF4J 绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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