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

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

问题描述

我的应用程序服务器的IBM WebSphere。
我得到了应用程序服务器日志下面的错误。
我在哪里可以在WebSphere设置?


  

[2012年9月19日14:56:54:940 EEST] 0000000A SystemErr - [R SLF4J:类路径中包含多个SLF4J绑定结果
  [2012年9月19日14:56:54:940 EEST] 0000000A SystemErr - [R SLF4J:见于[绑定wsjar的:文件:/ C:/Lib/slf4j-log4j12-1.6.1.jar /组织/ SLF4J / IMPL / StaticLoggerBinder的.class]结果
  [2012年9月19日14:56:54:941 EEST] 0000000A SystemErr - [R SLF4J:发现了绑定
  [bundleresource://217.fwk37356669:1 /组织/ SLF4J / IMPL / StaticLoggerBinder.class]结果
  [2012年9月19日14:56:54:941 EEST] 0000000A SystemErr - [R SLF4J:见<一href=\"http://www.slf4j.org/$c$cs.html#multiple_bindings\">http://www.slf4j.org/$c$cs.html#multiple_bindings一个解释。



解决方案

不幸的是,WebSphere有它自己的安装了很多常用的库。他们往往要在应用程序中使用的版本冲突。

选项是从应用程序中删除库罐子和使用提供了什么样的WebSphere或更改的类加载器设置为父最后,以确保与应用程序捆绑在一起的库被首次发现。 (这不会消除SLF4J警告,但将确保您的实现中使用)。

对不起,我不能在这里设置中找到(它几年,我上次与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: 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.

解决方案

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.

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).

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天全站免登陆