Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] SLF4J: Class path contains multiple SLF4J bindings. #40

Open
KavyashreeJ opened this issue Mar 26, 2015 · 12 comments
Open

[ERROR] SLF4J: Class path contains multiple SLF4J bindings. #40

KavyashreeJ opened this issue Mar 26, 2015 · 12 comments

Comments

@KavyashreeJ
Copy link

Hello,

I am getting the following error after trying to use Corbertura:

SLF4J: Found binding in [jar:file:/C:/Users/usr1/.jenkins/workspace/game-of-life-default/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/usr1/.jenkins/workspace/game-of-life-default/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

I know that this problem has been discussed earlier. but I could not figure out where exactly to place the 'exclusion' tags(http://www.slf4j.org/codes.html#multiple_bindings). Any help to solve this problem will be appreciated.

Thank you.

@schottsfired
Copy link
Contributor

Same issue here.

@RizzoV
Copy link

RizzoV commented Apr 23, 2015

Same here

@nichitapavel
Copy link

I'm with same problem, tried to modify pom.xml where <org.slf4j> dependency appears (gameolife-acceptance-tests and gameoflife-web) but with no luck. If I remove <org.slf4j> dependency's there is no error but no cobertura report is generated, that means that the problem is with logback-classic and since it doesn't appear in any pom.xml it means that it's dependency is implicit and not explicit, I tried to remove it but i'm not sure if "groupId" and "artifactId" are correct.
This is frustrating.

@huevos-y-bacon
Copy link

Did any of you get this working? Is anyone related to this book project actually monitoring these comments? John Smart? etc?

@nichitapavel
Copy link

I don't know how to make this error dissappear, but in order to generate cobertura report in Jenkins settings my goal was "cobertura:cobertura -Dcobertura.report.format=xml", it worked for me.

@schottsfired
Copy link
Contributor

@nichitapavel thanks, your workaround suppresses the error. I'm seeing 0% coverage everywhere on the Cobertura reports- are you seeing the same?

@nichitapavel
Copy link

@shott85 as far as I can remember you are right, the coverage was 0%, but it did use the same settings in other project and the coverage was working fine, I don't know it this helps you, sorry for so late response.

@timrsfo
Copy link

timrsfo commented Oct 31, 2015

i'm running this on ubuntu 12.04.5 with Java 7 and maven 3.1. I am getting the above error and I am not seeing any cobertura output file. I also tried the above "cobertura:cobertura -Dcobertura.report.format=xml" - still no output. Does this work for maven 3? I see there is a profile for maven3 and it doesn't have cobertura, it has jacoco. Does anybody know what I should be using on command line for maven3?

@sabaker
Copy link

sabaker commented May 5, 2016

I have it working in jenkins 2.1, with maven 3, and updated the maven-cobertura-plugin to 2.7.
Still used the "cobertura:cobertura -Dcobertura.report.format=xml" option to insure to get both xml and html and to remove the skip true configuration in the surefire plugin section to get nonzero coverage results.

I still see the SLFJ error.

@sabaker
Copy link

sabaker commented May 5, 2016

See related cobertura issue-
mojohaus/cobertura-maven-plugin#6

I've added the exclusion as indicated in dependencyManagement section of the POM, but it did not resolve it, I still get the error.

@pradeepjadi
Copy link

fixed with this


org.codehaus.mojo cobertura-maven-plugin 2.7 test ch.qos.logback logback-classic tools com.sun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants