java - Maven SLF4J: Class path contains multiple SLF4J bindings -
i getting following exception while compiling java code .please body how can resolve conflict.
slf4j: class path contains multiple slf4j bindings. slf4j: found binding in [jar:file:/c:/users/air/desktop/sms/slf4j-1.7.7/slf4j-android-1.7.7.jar!/org/slf4j/impl/staticloggerbinder.class] slf4j: found binding in [jar:file:/c:/users/air/desktop/sms/slf4j-1.7.7/slf4j-jcl-1.7.7.jar!/org/slf4j/impl/staticloggerbinder.class] slf4j: found binding in [jar:file:/c:/users/air/desktop/sms/slf4j-1.7.7/slf4j-jdk14-1.7.7.jar!/org/slf4j/impl/staticloggerbinder.class] slf4j: found binding in [jar:file:/c:/users/air/desktop/sms/slf4j-1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/staticloggerbinder.class] slf4j: found binding in [jar:file:/c:/users/air/desktop/sms/slf4j-1.7.7/slf4j-nop-1.7.7.jar!/org/slf4j/impl/staticloggerbinder.class] slf4j: found binding in [jar:file:/c:/users/air/desktop/sms/slf4j-1.7.7/slf4j-simple-1.7.7.jar!/org/slf4j/impl/staticloggerbinder.class] slf4j: see http://www.slf4j.org/codes.html#multiple_bindings explanation. slf4j: actual binding of type [org.slf4j.impl.androidloggerfactory] exception in thread "main" java.lang.exceptionininitializererror caused by: java.lang.runtimeexception: fatal error in constructor! ... 2 more
run mvn dependency:tree
, search dependency have slf4j
implementations not want, exclude them dependency exclusion like:
<dependency> <groupid>org.someexternallib</groupid> <artifactid>someexternallibartifact</artifactid> <version>...</version> <exclusions> <exclusion> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> </exclusion> <exclusion> <groupid>log4j</groupid> <artifactid>log4j</artifactid> </exclusion> </exclusions> </dependency>
Comments
Post a Comment