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

slf4j-simple dependency causing issues #184

adamsiemion opened this Issue Mar 3, 2017 · 2 comments


None yet
3 participants

adamsiemion commented Mar 3, 2017

I the Spring Boot project I work on I have an encountered the following issue after adding the pl.pojo:pojo-tester:0.7.3 dependency:

Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.SimpleLoggerFactory loaded from file:~/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.22/595058a6ec00a6e58f2f48113e8708f036a19cf7/slf4j-simple-1.7.22.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.slf4j.impl.SimpleLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext

I have created a sample project exposing this problem:

After a quick investigation I found out that pojo-tester has a dependency to slfj4-simple and changing:

testCompile ('pl.pojo:pojo-tester:0.7.3')


testCompile ('pl.pojo:pojo-tester:0.7.3') { 
  exclude group: "org.slf4j", module: "slf4j-simple" 

fixes the issue.

Since pojo-tester is a library I think it should not add a logger implementation. Instead it should has a dependency only to the logger interfaces (slfj4-api).

BTW. I think the library is cool and I use it in my project :)

@sta-szek sta-szek added this to the 0.7.4 milestone Mar 6, 2017

@sta-szek sta-szek added the bug label Mar 6, 2017


This comment has been minimized.


SemionPar commented Mar 6, 2017

Thank you for your feedback. This issue will be fixed shortly.


This comment has been minimized.


sta-szek commented Mar 6, 2017

Yea, someone is using it! :)
@SemionPar I think the problem would be in following lines:

@sta-szek sta-szek closed this in 62bf3c2 Mar 9, 2017

sta-szek pushed a commit that referenced this issue Mar 9, 2017

Piotr Joński
Merge pull request #186 from SemionPar/master
Use logging API instead backed as a dependency to fix #184.

@wafflebot wafflebot bot removed the current-milestone label Mar 9, 2017

@sta-szek sta-szek assigned sta-szek and unassigned sta-szek Mar 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment