SLF4J issue in a Non Maven project. Multiple bindings

Hi everyone.

I’m working in a non maven project which runs in a WebSphere Server application 8.5. I’m now trying to migrate this application from a development environment to a local environment. During this process when I try to deploy the application in server the console shows the following error: “slf4j class path contains multiple slf4j bindings”, and the installation, although finished the application is not working.

I’ve been looking for a solution but I just find this issue related to Maven projects, where the solution is just add an exclusion key in pom.xml. But, for this project, that is a non maven project I can’t understand why is this happening.

I understand that the issue is because of the other library that i use called “logback-classic” which use internally other instance of slf4j.

Someone who can help me please, I would really appreciate any comment. Thanks.

Is this an sbt build?

You can use this plugin to find where the extra JAR is coming from:

Here is how to add the exclusion:

https://www.scala-sbt.org/1.x/docs/Library-Management.html#Exclude+Transitive+Dependencies