You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Ted Yu <yu...@gmail.com> on 2013/05/04 19:43:29 UTC

Re: HBase and Apache Jena -SLF4J Conflict

Which HBase version are you using ?

In 0.94, I see the following in pom.xml:

<slf4j.version>1.4.3</slf4j.version>
...
        <hadoop.version>1.0.4</hadoop.version>
        <slf4j.version>1.4.3</slf4j.version>
The line above is for hadoop-1.0 profile. You can selectively override
SLF4J version so that it is consistent across both projects.

Cheers

On Sat, May 4, 2013 at 7:30 AM, Kiran <ki...@gmail.com> wrote:

> In a project I have to use HBase and Apache Jena libraries together.The
> SLF4J
> versions in lib directory of aech of them are 1.5.8 and 1.6.4
> respectively.When I run the project I get the following error message:
>
> /SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
>
> [jar:file:/usr/lib/hbase/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
>
> [jar:file:/home/yahoo/Downloads/apache-jena-2.7.4/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> Exception in thread "main" java.lang.NoSuchMethodError:
>
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
>         at
>
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
>         at org.apache.hadoop.hbase.zookeeper.ZKUtil.connect(ZKUtil.java:95)
>         at
>
> org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.<init>(ZooKeeperWatcher.java:123)
>         at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getZooKeeperWatcher(HConnectionManager.java:1265)
>         at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:526)
>         at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:516)
>         at
>
> org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:173)
>         at
> org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:94)
>         at lookup.lookup_gen.generate_lk_table(lookup_gen.java:45)
>         at lookup_tester.main(lookup_tester.java:23)
> Java Result: 1/
>
>
> However when I run the same project without Jena libraries no error occurs?
>
> Any idea of how to solve this problem?
>
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/HBase-and-Apache-Jena-SLF4J-Conflict-tp4043667.html
> Sent from the HBase User mailing list archive at Nabble.com.
>

Re: HBase and Apache Jena -SLF4J Conflict

Posted by Kiran <ki...@gmail.com>.
First of all I would like to make it clear that I'am not using Maven for my
project.In netbeans IDE I'am creating an ordinary Java project and imporitng
all libraries in lib folders of HBase, Hadoop and Jena.The versions I'am
using are:

HBase: 0.90.6
Hadoop: 0.20.2
Jena: 2.7.4

{HBase and Hadoop  part of CDH3U5}



--
View this message in context: http://apache-hbase.679495.n3.nabble.com/HBase-and-Apache-Jena-SLF4J-Conflict-tp4043667p4043684.html
Sent from the HBase User mailing list archive at Nabble.com.