Have slf4j-api and select the SLF4J binding of the appropriate version and add them as dependencies in your own POM. Perhaps some of your dependencies are transitively resolving the incompatible version of the SLF4J binding that caused the problem. Find the unwanted SLF4J binding in the library (you can easily do this with mvn dependency:tree ) and add the appropriate exception to your dependency to this lib.
(Normally, the SLF4J binding should not be declared in the library. There is actually something wrong that you can tell the library developer after you find the actual reason)
Refresh
Exactly what I'm talking about:
From the dependency tree:
[INFO] +- org.geogit:geogit-core:jar:0.8-SNAPSHOT:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:compile ..... [INFO] +- org.apache.hbase:hbase-client:jar:0.98.0-hadoop2:compile ..... [INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.5:compile [INFO] | | \- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
You have the slf4j-log4j12 from hbase-client , and version 1.6.1
However, slf4j-api you have version 1.7.5 in your project. They are incompatible.
The correct way to solve:
- Exclude
slf4j-log4j12 from your hbase-client dependency - Declare a compatible SLF4J binding in your own project
You should also report this as a bug for the zookeeper / hbase developer, since the library should not include the SLF4J binding as a function of compilation volume.
Adrian shum
source share