22
votes

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.

2
Did you visit the suggested link, and did it make sense? Are you asking this question to get help determining where the two bindings are coming from? You can see one is C:/Lib/slf4j-log4j12-1.6.1.jar. The other is, I think, an OSGi reference. Are you running under Eclipse/RAD? What version of WebSphere?dbreaux
No, I'm not asking the link.Using RAD8 and WAS8. I put underneath the folder C:/Lib/slf4j-log4j12-1.6.1.jar But do not do it [bundleresource :/ / 217.fwk37356669:aliplane
I fuound a better answer to that question here. Sorry for resuming again that question but I'm facing the exactly same problem now!elTomato

2 Answers

14
votes

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

0
votes

It's removing one of the conflicting classes from ear with console option "Remove file" and selecting whole jar (lib/slf4j-log4j12-1.7.2.jar). It will work after application restart.