You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Yu...@DELL.com on 2015/02/06 01:38:36 UTC

com/google/protobuf/Message not found Exception

Dell Customer Communication

Hi All,

I'm getting   NoClassFound exception for /com/google/protobuf/Message while getting connection to HTable in HBase. I am running HBase server single node on a VM with HBaseClient running on OSGI Karaf. I'm using the HBase 0.94.15 and Hadoop 1.0.4. I wrapped these two jars as feature and deployed on Karaf.

Any idea why this exception is thrown on Karaf? Which jar HBase 0.94.15 is using for this class? Do I need to deploy anything extra on Karaf?

Thanks,

YuLing

Caused by: java.lang.ClassNotFoundException: com.google.protobuf.Message

        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader .java:501)

        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:42 1)

        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:41 2)

        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultCl assLoader.java:107)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

        ... 64 more



Re: com/google/protobuf/Message not found Exception

Posted by Ted Yu <yu...@gmail.com>.
You can search in hbase source code:

import com.google.protobuf.Message;
./src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
      com.google.protobuf.Message.class,
./src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java

>From dependency tree:
[INFO] org.apache.hbase:hbase:jar:0.94.26
...
[INFO] +- com.google.protobuf:protobuf-java:jar:2.4.0a:compile

Please include the protobuf jar as feature.

Cheers

On Thu, Feb 5, 2015 at 4:38 PM, <Yu...@dell.com> wrote:

> Dell Customer Communication
>
> Hi All,
>
> I'm getting   NoClassFound exception for /com/google/protobuf/Message
> while getting connection to HTable in HBase. I am running HBase server
> single node on a VM with HBaseClient running on OSGI Karaf. I'm using the
> HBase 0.94.15 and Hadoop 1.0.4. I wrapped these two jars as feature and
> deployed on Karaf.
>
> Any idea why this exception is thrown on Karaf? Which jar HBase 0.94.15 is
> using for this class? Do I need to deploy anything extra on Karaf?
>
> Thanks,
>
> YuLing
>
> Caused by: java.lang.ClassNotFoundException: com.google.protobuf.Message
>
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader
> .java:501)
>
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:42
> 1)
>
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:41
> 2)
>
>         at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultCl
> assLoader.java:107)
>
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>
>         ... 64 more
>
>
>

RE: com/google/protobuf/Message not found Exception

Posted by Yu...@DELL.com.
Dell Customer Communication
Thanks Ted and Zhang for the replies.

Yes, I got it work by adding a bundle in feature.xml of Karaf.

Thanks,
YuLing

-----Original Message-----
From: 张铎 [mailto:palomino219@gmail.com]
Sent: Thursday, February 05, 2015 5:56 PM
To: dev@hbase.apache.org
Subject: Re: com/google/protobuf/Message not found Exception

I'm not familiar with Karaf so I do not know what is a "feature" in Karaf.

But hbase-client depends on many other jars, so usually you need to deploy them all, not only the hbase-client.jar and hadoop.jar. And for java programs, some people use maven-shade-plugin to pack a big jar with all dependencies in it and deploy it.

Hope this could help.

2015-02-06 8:38 GMT+08:00 :

> Dell Customer Communication
>
> Hi All,
>
> I'm getting NoClassFound exception for /com/google/protobuf/Message
> while getting connection to HTable in HBase. I am running HBase server
> single node on a VM with HBaseClient running on OSGI Karaf. I'm using
> the HBase 0.94.15 and Hadoop 1.0.4. I wrapped these two jars as
> feature and deployed on Karaf.
>
> Any idea why this exception is thrown on Karaf? Which jar HBase
> 0.94.15 is using for this class? Do I need to deploy anything extra on Karaf?
>
> Thanks,
>
> YuLing
>
> Caused by: java.lang.ClassNotFoundException:
> com.google.protobuf.Message
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(Bundle
> Loader
> .java:501)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.j
> ava:42
> 1)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.j
> ava:41
> 2)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Def
> aultCl
> assLoader.java:107)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>
> ... 64 more
>
>
>

Re: com/google/protobuf/Message not found Exception

Posted by 张铎 <pa...@gmail.com>.
I'm not familiar with Karaf so I do not know what is a "feature" in Karaf.

But hbase-client depends on many other jars, so usually you need to deploy
them all, not only the hbase-client.jar and hadoop.jar. And for java
programs, some people use maven-shade-plugin to pack a big jar with all
dependencies in it and deploy it.

Hope this could help.

2015-02-06 8:38 GMT+08:00 <Yu...@dell.com>:

> Dell Customer Communication
>
> Hi All,
>
> I'm getting   NoClassFound exception for /com/google/protobuf/Message
> while getting connection to HTable in HBase. I am running HBase server
> single node on a VM with HBaseClient running on OSGI Karaf. I'm using the
> HBase 0.94.15 and Hadoop 1.0.4. I wrapped these two jars as feature and
> deployed on Karaf.
>
> Any idea why this exception is thrown on Karaf? Which jar HBase 0.94.15 is
> using for this class? Do I need to deploy anything extra on Karaf?
>
> Thanks,
>
> YuLing
>
> Caused by: java.lang.ClassNotFoundException: com.google.protobuf.Message
>
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader
> .java:501)
>
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:42
> 1)
>
>         at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:41
> 2)
>
>         at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultCl
> assLoader.java:107)
>
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>
>         ... 64 more
>
>
>