Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.6
-
None
-
Gentoo Linux, Oracle JDK 1.7.0.51-r1
Description
Created project with the following dependencies:
<dependencies> <dependency> <groupId>org.apache.gora</groupId> <artifactId>gora-core</artifactId> <version>0.6-SNAPSHOT</version> </dependency> <dependency> <groupId>org.apache.gora</groupId> <artifactId>gora-hbase</artifactId> <version>0.6-SNAPSHOT</version> </dependency> </dependencies>
Snapshot version:
https://github.com/apache/gora/tree/a72c5d36033fa393e492c047cb818b318edd2b35
And got a critical runtime error described below.
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/bbg/.m2/repository/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/bbg/.m2/repository/org/slf4j/slf4j-simple/1.6.6/slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding. SLF4J: Your binding is version 1.5.5 or earlier. SLF4J: Upgrade your binding to version 1.6.x.
Stack trace:
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
at org.apache.gora.tutorial.log.LogManager.<clinit>(LogManager.java:24)
The error is caused by slf4j-api version conflict:
- gora-hbase depends on org.apache.hbase:hbase-0.94.14
- hbase-0.94.14 depends on org.slf4j:slf4j-log4j12 which causes the conflict.
We have to exclude this old dependency to sort the issue out.