You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by darkchanter <om...@hotmail.com> on 2014/07/04 22:00:43 UTC
Java Client API
Hello
I set up HBase 0.94.20 in stand-alone mode on my openSuSE, everything's fine
with that.
Now I am trying to reach it from a java program (running in eclipse)
My code crashes at line
HTable table = new HTable(config, "myLittleHBaseTable");
saying
Exception in thread "main" java.lang.NoClassDefFoundError:
com/google/protobuf/Message
Looks like the connection itself (and the session) is okay...
I imported the necessary jars and added the config-xml - is there still
something I missed?
You may find the code snipped here: http://nopaste.info/f0ff59718b.html
Thanks
Roger
--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Java-Client-API-tp4061046.html
Sent from the HBase Developer mailing list archive at Nabble.com.
Re: Java Client API
Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Moving to user, dev in BCC.
Hi Roger,
Your issue is not on HBase side, so not in the config.xml. It's on you
client classpath that you are missing some jars.
You can use "hbase classpath" to see what are the jars required and make
sure you have them on your client side.
JM
2014-07-04 16:00 GMT-04:00 darkchanter <om...@hotmail.com>:
> Hello
> I set up HBase 0.94.20 in stand-alone mode on my openSuSE, everything's
> fine
> with that.
>
> Now I am trying to reach it from a java program (running in eclipse)
>
> My code crashes at line
>
> HTable table = new HTable(config, "myLittleHBaseTable");
>
> saying
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/protobuf/Message
>
> Looks like the connection itself (and the session) is okay...
>
> I imported the necessary jars and added the config-xml - is there still
> something I missed?
>
> You may find the code snipped here: http://nopaste.info/f0ff59718b.html
>
> Thanks
> Roger
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Java-Client-API-tp4061046.html
> Sent from the HBase Developer mailing list archive at Nabble.com.
>
Re: Java Client API
Posted by Gustavo Anatoly <gu...@gmail.com>.
Hi, Roger.
Check again the necessary jars (protobuf). For HBase 0.94 you should import:
<protobuf.version>2.4.0a</protobuf.version>
If you have some doubt about the jars used by HBase, I suggest read the pom.xml.
For the version mentioned, check it out:
https://github.com/apache/hbase/tree/0.94
Thanks.
2014-07-04 17:00 GMT-03:00 darkchanter <om...@hotmail.com>:
> Hello
> I set up HBase 0.94.20 in stand-alone mode on my openSuSE, everything's
> fine
> with that.
>
> Now I am trying to reach it from a java program (running in eclipse)
>
> My code crashes at line
>
> HTable table = new HTable(config, "myLittleHBaseTable");
>
> saying
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/protobuf/Message
>
> Looks like the connection itself (and the session) is okay...
>
> I imported the necessary jars and added the config-xml - is there still
> something I missed?
>
> You may find the code snipped here: http://nopaste.info/f0ff59718b.html
>
> Thanks
> Roger
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Java-Client-API-tp4061046.html
> Sent from the HBase Developer mailing list archive at Nabble.com.
>
Re: Java Client API
Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Moving to user, dev in BCC.
Hi Roger,
Your issue is not on HBase side, so not in the config.xml. It's on you
client classpath that you are missing some jars.
You can use "hbase classpath" to see what are the jars required and make
sure you have them on your client side.
JM
2014-07-04 16:00 GMT-04:00 darkchanter <om...@hotmail.com>:
> Hello
> I set up HBase 0.94.20 in stand-alone mode on my openSuSE, everything's
> fine
> with that.
>
> Now I am trying to reach it from a java program (running in eclipse)
>
> My code crashes at line
>
> HTable table = new HTable(config, "myLittleHBaseTable");
>
> saying
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/protobuf/Message
>
> Looks like the connection itself (and the session) is okay...
>
> I imported the necessary jars and added the config-xml - is there still
> something I missed?
>
> You may find the code snipped here: http://nopaste.info/f0ff59718b.html
>
> Thanks
> Roger
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Java-Client-API-tp4061046.html
> Sent from the HBase Developer mailing list archive at Nabble.com.
>