I am using SBT 1.5.2 in a Java Play framework project but whenever I run the play project i get an error:
java.lang.ClassCastException: org.slf4j.impl.SimpleLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
It is caused by this dependency:
"io.swagger" % "swagger-codegen-cli" % "2.4.19"
Because removing it ( or adding % provided) resolves the error. However, I need the dependency.
I checked swagger-codegen-cli’s dependencies and it shows this in its POM
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j-version}</version>
</dependency>
How to fix ithis? I tried changing the dependency to
"io.swagger" % "swagger-codegen-cli" % "2.4.19" exclude("org.slf4j", "slf4j-simple")
but that didnt work either.
Any help appreciated! Cheers.