You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Neetu Ojha <ne...@gmail.com> on 2012/01/05 10:34:55 UTC

hbase-0.90.4 unable to execute java application to retrieve hbase table

Hello,


I have installed HBase-0.90.4 on my local machine and as shown in "quick
start " i installed/configured in standalone mode using my local file
system of fedora-15. I have not started hadoop daemon assuming that its not
needed as its completely standalone config. All the required libs that
comes with the package are there. I faced lot of difficulty in compiling
the simple code itself.I set CLASSPATH, in hbase-env.sh set HBASE_CLASSPATH
but now it doen'n run. I took a code from the net and has created the
required table in the hbase.

When   I am trying to execute a very basic java code using Hbase-0.90.4
API. some how it compiled but on execution it throws exception:
java MyLittleHBaseClient
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory
    at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    ... 2 more


Kindly see if any one has experienced the same issue at any point of time.
As for me its a long way ahead, hbase over HDFS and then hadoop
cluster.......


 Thanks & Regards
 Neetu sharma

Re: hbase-0.90.4 unable to execute java application to retrieve hbase table

Posted by shashwat shriparv <dw...@gmail.com>.
Have you added the required jar in you ur project??

On Thu, Jan 5, 2012 at 3:04 PM, Neetu Ojha <ne...@gmail.com> wrote:

> Hello,
>
>
> I have installed HBase-0.90.4 on my local machine and as shown in "quick
> start " i installed/configured in standalone mode using my local file
> system of fedora-15. I have not started hadoop daemon assuming that its not
> needed as its completely standalone config. All the required libs that
> comes with the package are there. I faced lot of difficulty in compiling
> the simple code itself.I set CLASSPATH, in hbase-env.sh set HBASE_CLASSPATH
> but now it doen'n run. I took a code from the net and has created the
> required table in the hbase.
>
> When   I am trying to execute a very basic java code using Hbase-0.90.4
> API. some how it compiled but on execution it throws exception:
> java MyLittleHBaseClient
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
>    at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
>    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.logging.LogFactory
>    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>    ... 2 more
>
>
> Kindly see if any one has experienced the same issue at any point of time.
> As for me its a long way ahead, hbase over HDFS and then hadoop
> cluster.......
>
>
>  Thanks & Regards
>  Neetu sharma
>



-- 
Shashwat Shriparv
09900059620
09663531241



<iframe src="
http://rcm.amazon.com/e/cm?t=shriparv-20&o=1&p=48&l=ur1&category=kindlerotating&f=ifr"
width="728" height="90" scrolling="no" border="0" marginwidth="0"
style="border:none;" frameborder="0"></iframe>

Re: hbase-0.90.4 unable to execute java application to retrieve hbase table

Posted by Neetu Ojha <ne...@gmail.com>.
Hi Ulrich
 Thanks a  lot again!!!

Regards
Neetu


On Thu, Jan 5, 2012 at 5:22 PM, Ulrich Staudinger <
ustaudinger@activequant.com> wrote:

> I just checked and I also include the hadoop dependency and exclude several
> packages from.
>
> see http://activequant.org/svn/aq2o/trunk/pom.xml for a working pom.
>
>
>
> On Thu, Jan 5, 2012 at 12:50 PM, Ulrich Staudinger <
> ustaudinger@activequant.com> wrote:
>
> > With maven it becomes quite trivial to create an hbase app.
> >
> > You would add the hbase dependency:
> >
> >               <dependency>
> >                       <groupId>org.apache.hbase</groupId>
> >                       <artifactId>hbase</artifactId>
> >                       <version>${hbase.version}</version>
> >               </dependency>
> >
> > and possibly the hbase repository
> >
> >               <repository>
> >                       <id>hbase</id>
> >                       <url>
> https://repository.apache.org/content/repositories/releases/</url>
> >               </repository>
> >
> > and you are ready to go.
> >
> > well, if you read into it, you'll understand what i say.
> >
> >
> > On Thu, Jan 5, 2012 at 12:41 PM, Neetu Ojha <neetuojha.cdac@gmail.com
> >wrote:
> >
> >> Thanks A lot!
> >>
> >>  Well Ulrich i am not at alll aware of maven!!!
> >>
> >>
> >> Regards
> >> Neetu Sharma
> >>
> >> On Thu, Jan 5, 2012 at 3:53 PM, Ulrich Staudinger <
> >> ustaudinger@activequant.com> wrote:
> >>
> >> > That's more a java related question.
> >> > With maven it is pretty straightforward to get this up and running,
> >> without
> >> > altering the CLASSPATH or even having HBase installed on your machine.
> >> >
> >> > Do you use maven?
> >> >
> >> >
> >> >
> >> > On Thu, Jan 5, 2012 at 10:34 AM, Neetu Ojha <neetuojha.cdac@gmail.com
> >> > >wrote:
> >> >
> >> > > Hello,
> >> > >
> >> > >
> >> > > I have installed HBase-0.90.4 on my local machine and as shown in
> >> "quick
> >> > > start " i installed/configured in standalone mode using my local
> file
> >> > > system of fedora-15. I have not started hadoop daemon assuming that
> >> its
> >> > not
> >> > > needed as its completely standalone config. All the required libs
> that
> >> > > comes with the package are there. I faced lot of difficulty in
> >> compiling
> >> > > the simple code itself.I set CLASSPATH, in hbase-env.sh set
> >> > HBASE_CLASSPATH
> >> > > but now it doen'n run. I took a code from the net and has created
> the
> >> > > required table in the hbase.
> >> > >
> >> > > When   I am trying to execute a very basic java code using
> >> Hbase-0.90.4
> >> > > API. some how it compiled but on execution it throws exception:
> >> > > java MyLittleHBaseClient
> >> > > Exception in thread "main" java.lang.NoClassDefFoundError:
> >> > > org/apache/commons/logging/LogFactory
> >> > >    at
> >> > org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
> >> > >    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
> >> > > Caused by: java.lang.ClassNotFoundException:
> >> > > org.apache.commons.logging.LogFactory
> >> > >    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >> > >    at java.security.AccessController.doPrivileged(Native Method)
> >> > >    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >> > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> >> > >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> >> > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> >> > >    ... 2 more
> >> > >
> >> > >
> >> > > Kindly see if any one has experienced the same issue at any point of
> >> > time.
> >> > > As for me its a long way ahead, hbase over HDFS and then hadoop
> >> > > cluster.......
> >> > >
> >> > >
> >> > >  Thanks & Regards
> >> > >  Neetu sharma
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Ulrich Staudinger
> >> >
> >> > <http://goog_958005736>http://www.activequant.com
> >> > Connect online: https://www.xing.com/profile/Ulrich_Staudinger
> >> >
> >>
> >
> >
> >
> > --
> > Ulrich Staudinger
> >
> > <http://goog_958005736>http://www.activequant.com
> > Connect online: https://www.xing.com/profile/Ulrich_Staudinger
> >
>
>
>
> --
> Ulrich Staudinger
>
> <http://goog_958005736>http://www.activequant.com
> Connect online: https://www.xing.com/profile/Ulrich_Staudinger
>

Re: hbase-0.90.4 unable to execute java application to retrieve hbase table

Posted by Ulrich Staudinger <us...@activequant.com>.
I just checked and I also include the hadoop dependency and exclude several
packages from.

see http://activequant.org/svn/aq2o/trunk/pom.xml for a working pom.



On Thu, Jan 5, 2012 at 12:50 PM, Ulrich Staudinger <
ustaudinger@activequant.com> wrote:

> With maven it becomes quite trivial to create an hbase app.
>
> You would add the hbase dependency:
>
> 		<dependency>
> 			<groupId>org.apache.hbase</groupId>
> 			<artifactId>hbase</artifactId>
> 			<version>${hbase.version}</version>
> 		</dependency>
>
> and possibly the hbase repository
>
> 		<repository>
> 			<id>hbase</id>
> 			<url>https://repository.apache.org/content/repositories/releases/</url>
> 		</repository>
>
> and you are ready to go.
>
> well, if you read into it, you'll understand what i say.
>
>
> On Thu, Jan 5, 2012 at 12:41 PM, Neetu Ojha <ne...@gmail.com>wrote:
>
>> Thanks A lot!
>>
>>  Well Ulrich i am not at alll aware of maven!!!
>>
>>
>> Regards
>> Neetu Sharma
>>
>> On Thu, Jan 5, 2012 at 3:53 PM, Ulrich Staudinger <
>> ustaudinger@activequant.com> wrote:
>>
>> > That's more a java related question.
>> > With maven it is pretty straightforward to get this up and running,
>> without
>> > altering the CLASSPATH or even having HBase installed on your machine.
>> >
>> > Do you use maven?
>> >
>> >
>> >
>> > On Thu, Jan 5, 2012 at 10:34 AM, Neetu Ojha <neetuojha.cdac@gmail.com
>> > >wrote:
>> >
>> > > Hello,
>> > >
>> > >
>> > > I have installed HBase-0.90.4 on my local machine and as shown in
>> "quick
>> > > start " i installed/configured in standalone mode using my local file
>> > > system of fedora-15. I have not started hadoop daemon assuming that
>> its
>> > not
>> > > needed as its completely standalone config. All the required libs that
>> > > comes with the package are there. I faced lot of difficulty in
>> compiling
>> > > the simple code itself.I set CLASSPATH, in hbase-env.sh set
>> > HBASE_CLASSPATH
>> > > but now it doen'n run. I took a code from the net and has created the
>> > > required table in the hbase.
>> > >
>> > > When   I am trying to execute a very basic java code using
>> Hbase-0.90.4
>> > > API. some how it compiled but on execution it throws exception:
>> > > java MyLittleHBaseClient
>> > > Exception in thread "main" java.lang.NoClassDefFoundError:
>> > > org/apache/commons/logging/LogFactory
>> > >    at
>> > org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
>> > >    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
>> > > Caused by: java.lang.ClassNotFoundException:
>> > > org.apache.commons.logging.LogFactory
>> > >    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>> > >    at java.security.AccessController.doPrivileged(Native Method)
>> > >    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>> > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>> > >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>> > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>> > >    ... 2 more
>> > >
>> > >
>> > > Kindly see if any one has experienced the same issue at any point of
>> > time.
>> > > As for me its a long way ahead, hbase over HDFS and then hadoop
>> > > cluster.......
>> > >
>> > >
>> > >  Thanks & Regards
>> > >  Neetu sharma
>> > >
>> >
>> >
>> >
>> > --
>> > Ulrich Staudinger
>> >
>> > <http://goog_958005736>http://www.activequant.com
>> > Connect online: https://www.xing.com/profile/Ulrich_Staudinger
>> >
>>
>
>
>
> --
> Ulrich Staudinger
>
> <http://goog_958005736>http://www.activequant.com
> Connect online: https://www.xing.com/profile/Ulrich_Staudinger
>



-- 
Ulrich Staudinger

<http://goog_958005736>http://www.activequant.com
Connect online: https://www.xing.com/profile/Ulrich_Staudinger

Re: hbase-0.90.4 unable to execute java application to retrieve hbase table

Posted by Ulrich Staudinger <us...@activequant.com>.
With maven it becomes quite trivial to create an hbase app.

You would add the hbase dependency:

		<dependency>
			<groupId>org.apache.hbase</groupId>
			<artifactId>hbase</artifactId>
			<version>${hbase.version}</version>
		</dependency>

and possibly the hbase repository

		<repository>
			<id>hbase</id>
			<url>https://repository.apache.org/content/repositories/releases/</url>
		</repository>

and you are ready to go.

well, if you read into it, you'll understand what i say.


On Thu, Jan 5, 2012 at 12:41 PM, Neetu Ojha <ne...@gmail.com>wrote:

> Thanks A lot!
>
>  Well Ulrich i am not at alll aware of maven!!!
>
>
> Regards
> Neetu Sharma
>
> On Thu, Jan 5, 2012 at 3:53 PM, Ulrich Staudinger <
> ustaudinger@activequant.com> wrote:
>
> > That's more a java related question.
> > With maven it is pretty straightforward to get this up and running,
> without
> > altering the CLASSPATH or even having HBase installed on your machine.
> >
> > Do you use maven?
> >
> >
> >
> > On Thu, Jan 5, 2012 at 10:34 AM, Neetu Ojha <neetuojha.cdac@gmail.com
> > >wrote:
> >
> > > Hello,
> > >
> > >
> > > I have installed HBase-0.90.4 on my local machine and as shown in
> "quick
> > > start " i installed/configured in standalone mode using my local file
> > > system of fedora-15. I have not started hadoop daemon assuming that its
> > not
> > > needed as its completely standalone config. All the required libs that
> > > comes with the package are there. I faced lot of difficulty in
> compiling
> > > the simple code itself.I set CLASSPATH, in hbase-env.sh set
> > HBASE_CLASSPATH
> > > but now it doen'n run. I took a code from the net and has created the
> > > required table in the hbase.
> > >
> > > When   I am trying to execute a very basic java code using Hbase-0.90.4
> > > API. some how it compiled but on execution it throws exception:
> > > java MyLittleHBaseClient
> > > Exception in thread "main" java.lang.NoClassDefFoundError:
> > > org/apache/commons/logging/LogFactory
> > >    at
> > org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
> > >    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
> > > Caused by: java.lang.ClassNotFoundException:
> > > org.apache.commons.logging.LogFactory
> > >    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> > >    at java.security.AccessController.doPrivileged(Native Method)
> > >    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> > >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> > >    ... 2 more
> > >
> > >
> > > Kindly see if any one has experienced the same issue at any point of
> > time.
> > > As for me its a long way ahead, hbase over HDFS and then hadoop
> > > cluster.......
> > >
> > >
> > >  Thanks & Regards
> > >  Neetu sharma
> > >
> >
> >
> >
> > --
> > Ulrich Staudinger
> >
> > <http://goog_958005736>http://www.activequant.com
> > Connect online: https://www.xing.com/profile/Ulrich_Staudinger
> >
>



-- 
Ulrich Staudinger

<http://goog_958005736>http://www.activequant.com
Connect online: https://www.xing.com/profile/Ulrich_Staudinger

Re: hbase-0.90.4 unable to execute java application to retrieve hbase table

Posted by Neetu Ojha <ne...@gmail.com>.
Thanks A lot!

 Well Ulrich i am not at alll aware of maven!!!


Regards
Neetu Sharma

On Thu, Jan 5, 2012 at 3:53 PM, Ulrich Staudinger <
ustaudinger@activequant.com> wrote:

> That's more a java related question.
> With maven it is pretty straightforward to get this up and running, without
> altering the CLASSPATH or even having HBase installed on your machine.
>
> Do you use maven?
>
>
>
> On Thu, Jan 5, 2012 at 10:34 AM, Neetu Ojha <neetuojha.cdac@gmail.com
> >wrote:
>
> > Hello,
> >
> >
> > I have installed HBase-0.90.4 on my local machine and as shown in "quick
> > start " i installed/configured in standalone mode using my local file
> > system of fedora-15. I have not started hadoop daemon assuming that its
> not
> > needed as its completely standalone config. All the required libs that
> > comes with the package are there. I faced lot of difficulty in compiling
> > the simple code itself.I set CLASSPATH, in hbase-env.sh set
> HBASE_CLASSPATH
> > but now it doen'n run. I took a code from the net and has created the
> > required table in the hbase.
> >
> > When   I am trying to execute a very basic java code using Hbase-0.90.4
> > API. some how it compiled but on execution it throws exception:
> > java MyLittleHBaseClient
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/apache/commons/logging/LogFactory
> >    at
> org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
> >    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.commons.logging.LogFactory
> >    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >    at java.security.AccessController.doPrivileged(Native Method)
> >    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> >    ... 2 more
> >
> >
> > Kindly see if any one has experienced the same issue at any point of
> time.
> > As for me its a long way ahead, hbase over HDFS and then hadoop
> > cluster.......
> >
> >
> >  Thanks & Regards
> >  Neetu sharma
> >
>
>
>
> --
> Ulrich Staudinger
>
> <http://goog_958005736>http://www.activequant.com
> Connect online: https://www.xing.com/profile/Ulrich_Staudinger
>

Re: hbase-0.90.4 unable to execute java application to retrieve hbase table

Posted by Ulrich Staudinger <us...@activequant.com>.
That's more a java related question.
With maven it is pretty straightforward to get this up and running, without
altering the CLASSPATH or even having HBase installed on your machine.

Do you use maven?



On Thu, Jan 5, 2012 at 10:34 AM, Neetu Ojha <ne...@gmail.com>wrote:

> Hello,
>
>
> I have installed HBase-0.90.4 on my local machine and as shown in "quick
> start " i installed/configured in standalone mode using my local file
> system of fedora-15. I have not started hadoop daemon assuming that its not
> needed as its completely standalone config. All the required libs that
> comes with the package are there. I faced lot of difficulty in compiling
> the simple code itself.I set CLASSPATH, in hbase-env.sh set HBASE_CLASSPATH
> but now it doen'n run. I took a code from the net and has created the
> required table in the hbase.
>
> When   I am trying to execute a very basic java code using Hbase-0.90.4
> API. some how it compiled but on execution it throws exception:
> java MyLittleHBaseClient
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
>    at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:139)
>    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:21)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.logging.LogFactory
>    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>    ... 2 more
>
>
> Kindly see if any one has experienced the same issue at any point of time.
> As for me its a long way ahead, hbase over HDFS and then hadoop
> cluster.......
>
>
>  Thanks & Regards
>  Neetu sharma
>



-- 
Ulrich Staudinger

<http://goog_958005736>http://www.activequant.com
Connect online: https://www.xing.com/profile/Ulrich_Staudinger