You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Mahdi Negahi <ne...@hotmail.com> on 2012/03/12 09:45:51 UTC

Java Programming and Hbase

Dear Friends


I try to write a simple application with Java and manipulate my Hbase table. so I read this post and try to follow it.

http://hbase.apache.org/docs/current/api/index.html

I use eclipse and add hbase-092.0.jar as external jar file for my project. but i have problem in the first line of guideline. the following code line 
Configuration config = HBaseConfiguration.create();

has a following error

The type org.apache.hadoop.conf.Configuration cannot be resolved. It is indirectly referenced from required .class files

and Configuration's package that eclipse want to add to my project is

import javax.security.auth.login.Configuration;

i think it is not an appropriate package.

please advice me and refer me to new guideline.
 		 	   		  

RE: Java Programming and Hbase

Posted by Mahdi Negahi <ne...@hotmail.com>.
I install habse in standalone and I don't install Hadoop. 
 > Date: Mon, 12 Mar 2012 10:43:44 +0100
> Subject: Re: Java Programming and Hbase
> From: khiemu@googlemail.com
> To: user@hbase.apache.org
> 
> you also need to import hadoop.jar, since hbase runs on hahoop
> 
> 
> 
> On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <ne...@hotmail.com>wrote:
> 
> >
> > Dear Friends
> >
> >
> > I try to write a simple application with Java and manipulate my Hbase
> > table. so I read this post and try to follow it.
> >
> > http://hbase.apache.org/docs/current/api/index.html
> >
> > I use eclipse and add hbase-092.0.jar as external jar file for my project.
> > but i have problem in the first line of guideline. the following code line
> > Configuration config = HBaseConfiguration.create();
> >
> > has a following error
> >
> > The type org.apache.hadoop.conf.Configuration cannot be resolved. It is
> > indirectly referenced from required .class files
> >
> > and Configuration's package that eclipse want to add to my project is
> >
> > import javax.security.auth.login.Configuration;
> >
> > i think it is not an appropriate package.
> >
> > please advice me and refer me to new guideline.
> >
 		 	   		  

RE: Java Programming and Hbase

Posted by Mahdi Negahi <ne...@hotmail.com>.
thanks a lot , it worked

> Date: Mon, 12 Mar 2012 23:57:28 +0530
> Subject: Re: Java Programming and Hbase
> From: dwivedishashwat@gmail.com
> To: user@hbase.apache.org
> 
> Check out this mail thread and follow hope this will solve your problem
> 
> http://mail-archives.apache.org/mod_mbox/hadoop-common-user/201012.mbox/%3C6B159E02-5C17-4371-B764-A572D9F10099@umail.ucsb.edu%3E
> 
> 
> Dont forget to import hadoop.jar and check if hadoop is running
> 
> Regards
> Shashwat
> 
> On Mon, Mar 12, 2012 at 11:48 PM, Mohammad Tariq <do...@gmail.com> wrote:
> 
> > Hello Mahdi,
> >
> >  Have you imported "org.apache.hadoop.conf.Configuration" in your
> > code.May be you have added the jar but forgot to import it.
> >
> > Regards,
> >     Mohammad Tariq
> >
> >
> >
> > On Mon, Mar 12, 2012 at 6:06 PM, N Keywal <nk...@gmail.com> wrote:
> > > only jar files. They are already in the hbase distrib (i.e. if you
> > download
> > > hbase, you get the hadoop jar files you need). You just need to import
> > them
> > > in your IDE.
> > >
> > >
> > > On Mon, Mar 12, 2012 at 1:05 PM, Mahdi Negahi <negahi.mahdi@hotmail.com
> > >wrote:
> > >
> > >>
> > >> I so confused. I must install Hadoop or use only jar files ?
> > >>
> > >> > Date: Mon, 12 Mar 2012 12:46:09 +0100
> > >> > Subject: RE: Java Programming and Hbase
> > >> > From: nkeywal@gmail.com
> > >> > To: user@hbase.apache.org
> > >> >
> > >> > You will need the hadoop jar for this. Hbase uses hadoop for common
> > stuff
> > >> > like the configuration you've seen, so even a simple client needs it.
> > >> >
> > >> > N.
> > >> > Le 12 mars 2012 12:06, "Mahdi Negahi" <ne...@hotmail.com> a
> > >> écrit :
> > >> >
> > >> > >
> > >> > > Is it necessary to install hadoop for hbase, if  want use Hbase in
> > my
> > >> > > laptop and use it via Java ?????
> > >> > >
> > >> > > > Date: Mon, 12 Mar 2012 10:43:44 +0100
> > >> > > > Subject: Re: Java Programming and Hbase
> > >> > > > From: khiemu@googlemail.com
> > >> > > > To: user@hbase.apache.org
> > >> > > >
> > >> > > > you also need to import hadoop.jar, since hbase runs on hahoop
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <
> > >> negahi.mahdi@hotmail.com
> > >> > > >wrote:
> > >> > > >
> > >> > > > >
> > >> > > > > Dear Friends
> > >> > > > >
> > >> > > > >
> > >> > > > > I try to write a simple application with Java and manipulate my
> > >> Hbase
> > >> > > > > table. so I read this post and try to follow it.
> > >> > > > >
> > >> > > > > http://hbase.apache.org/docs/current/api/index.html
> > >> > > > >
> > >> > > > > I use eclipse and add hbase-092.0.jar as external jar file for
> > my
> > >> > > project.
> > >> > > > > but i have problem in the first line of guideline. the following
> > >> code
> > >> > > line
> > >> > > > > Configuration config = HBaseConfiguration.create();
> > >> > > > >
> > >> > > > > has a following error
> > >> > > > >
> > >> > > > > The type org.apache.hadoop.conf.Configuration cannot be
> > resolved.
> > >> It is
> > >> > > > > indirectly referenced from required .class files
> > >> > > > >
> > >> > > > > and Configuration's package that eclipse want to add to my
> > project
> > >> is
> > >> > > > >
> > >> > > > > import javax.security.auth.login.Configuration;
> > >> > > > >
> > >> > > > > i think it is not an appropriate package.
> > >> > > > >
> > >> > > > > please advice me and refer me to new guideline.
> > >> > > > >
> > >> > >
> > >>
> > >>
> >
> 
> 
> 
> -- 
> Shashwat Shriparv
> 
> +91-9663531241
> +91-990059620
 		 	   		  

Re: Java Programming and Hbase

Posted by shashwat shriparv <dw...@gmail.com>.
Check out this mail thread and follow hope this will solve your problem

http://mail-archives.apache.org/mod_mbox/hadoop-common-user/201012.mbox/%3C6B159E02-5C17-4371-B764-A572D9F10099@umail.ucsb.edu%3E


Dont forget to import hadoop.jar and check if hadoop is running

Regards
Shashwat

On Mon, Mar 12, 2012 at 11:48 PM, Mohammad Tariq <do...@gmail.com> wrote:

> Hello Mahdi,
>
>  Have you imported "org.apache.hadoop.conf.Configuration" in your
> code.May be you have added the jar but forgot to import it.
>
> Regards,
>     Mohammad Tariq
>
>
>
> On Mon, Mar 12, 2012 at 6:06 PM, N Keywal <nk...@gmail.com> wrote:
> > only jar files. They are already in the hbase distrib (i.e. if you
> download
> > hbase, you get the hadoop jar files you need). You just need to import
> them
> > in your IDE.
> >
> >
> > On Mon, Mar 12, 2012 at 1:05 PM, Mahdi Negahi <negahi.mahdi@hotmail.com
> >wrote:
> >
> >>
> >> I so confused. I must install Hadoop or use only jar files ?
> >>
> >> > Date: Mon, 12 Mar 2012 12:46:09 +0100
> >> > Subject: RE: Java Programming and Hbase
> >> > From: nkeywal@gmail.com
> >> > To: user@hbase.apache.org
> >> >
> >> > You will need the hadoop jar for this. Hbase uses hadoop for common
> stuff
> >> > like the configuration you've seen, so even a simple client needs it.
> >> >
> >> > N.
> >> > Le 12 mars 2012 12:06, "Mahdi Negahi" <ne...@hotmail.com> a
> >> écrit :
> >> >
> >> > >
> >> > > Is it necessary to install hadoop for hbase, if  want use Hbase in
> my
> >> > > laptop and use it via Java ?????
> >> > >
> >> > > > Date: Mon, 12 Mar 2012 10:43:44 +0100
> >> > > > Subject: Re: Java Programming and Hbase
> >> > > > From: khiemu@googlemail.com
> >> > > > To: user@hbase.apache.org
> >> > > >
> >> > > > you also need to import hadoop.jar, since hbase runs on hahoop
> >> > > >
> >> > > >
> >> > > >
> >> > > > On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <
> >> negahi.mahdi@hotmail.com
> >> > > >wrote:
> >> > > >
> >> > > > >
> >> > > > > Dear Friends
> >> > > > >
> >> > > > >
> >> > > > > I try to write a simple application with Java and manipulate my
> >> Hbase
> >> > > > > table. so I read this post and try to follow it.
> >> > > > >
> >> > > > > http://hbase.apache.org/docs/current/api/index.html
> >> > > > >
> >> > > > > I use eclipse and add hbase-092.0.jar as external jar file for
> my
> >> > > project.
> >> > > > > but i have problem in the first line of guideline. the following
> >> code
> >> > > line
> >> > > > > Configuration config = HBaseConfiguration.create();
> >> > > > >
> >> > > > > has a following error
> >> > > > >
> >> > > > > The type org.apache.hadoop.conf.Configuration cannot be
> resolved.
> >> It is
> >> > > > > indirectly referenced from required .class files
> >> > > > >
> >> > > > > and Configuration's package that eclipse want to add to my
> project
> >> is
> >> > > > >
> >> > > > > import javax.security.auth.login.Configuration;
> >> > > > >
> >> > > > > i think it is not an appropriate package.
> >> > > > >
> >> > > > > please advice me and refer me to new guideline.
> >> > > > >
> >> > >
> >>
> >>
>



-- 
Shashwat Shriparv

+91-9663531241
+91-990059620

Re: Java Programming and Hbase

Posted by Mohammad Tariq <do...@gmail.com>.
Hello Mahdi,

  Have you imported "org.apache.hadoop.conf.Configuration" in your
code.May be you have added the jar but forgot to import it.

Regards,
    Mohammad Tariq



On Mon, Mar 12, 2012 at 6:06 PM, N Keywal <nk...@gmail.com> wrote:
> only jar files. They are already in the hbase distrib (i.e. if you download
> hbase, you get the hadoop jar files you need). You just need to import them
> in your IDE.
>
>
> On Mon, Mar 12, 2012 at 1:05 PM, Mahdi Negahi <ne...@hotmail.com>wrote:
>
>>
>> I so confused. I must install Hadoop or use only jar files ?
>>
>> > Date: Mon, 12 Mar 2012 12:46:09 +0100
>> > Subject: RE: Java Programming and Hbase
>> > From: nkeywal@gmail.com
>> > To: user@hbase.apache.org
>> >
>> > You will need the hadoop jar for this. Hbase uses hadoop for common stuff
>> > like the configuration you've seen, so even a simple client needs it.
>> >
>> > N.
>> > Le 12 mars 2012 12:06, "Mahdi Negahi" <ne...@hotmail.com> a
>> écrit :
>> >
>> > >
>> > > Is it necessary to install hadoop for hbase, if  want use Hbase in my
>> > > laptop and use it via Java ?????
>> > >
>> > > > Date: Mon, 12 Mar 2012 10:43:44 +0100
>> > > > Subject: Re: Java Programming and Hbase
>> > > > From: khiemu@googlemail.com
>> > > > To: user@hbase.apache.org
>> > > >
>> > > > you also need to import hadoop.jar, since hbase runs on hahoop
>> > > >
>> > > >
>> > > >
>> > > > On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <
>> negahi.mahdi@hotmail.com
>> > > >wrote:
>> > > >
>> > > > >
>> > > > > Dear Friends
>> > > > >
>> > > > >
>> > > > > I try to write a simple application with Java and manipulate my
>> Hbase
>> > > > > table. so I read this post and try to follow it.
>> > > > >
>> > > > > http://hbase.apache.org/docs/current/api/index.html
>> > > > >
>> > > > > I use eclipse and add hbase-092.0.jar as external jar file for my
>> > > project.
>> > > > > but i have problem in the first line of guideline. the following
>> code
>> > > line
>> > > > > Configuration config = HBaseConfiguration.create();
>> > > > >
>> > > > > has a following error
>> > > > >
>> > > > > The type org.apache.hadoop.conf.Configuration cannot be resolved.
>> It is
>> > > > > indirectly referenced from required .class files
>> > > > >
>> > > > > and Configuration's package that eclipse want to add to my project
>> is
>> > > > >
>> > > > > import javax.security.auth.login.Configuration;
>> > > > >
>> > > > > i think it is not an appropriate package.
>> > > > >
>> > > > > please advice me and refer me to new guideline.
>> > > > >
>> > >
>>
>>

Re: Java Programming and Hbase

Posted by N Keywal <nk...@gmail.com>.
only jar files. They are already in the hbase distrib (i.e. if you download
hbase, you get the hadoop jar files you need). You just need to import them
in your IDE.


On Mon, Mar 12, 2012 at 1:05 PM, Mahdi Negahi <ne...@hotmail.com>wrote:

>
> I so confused. I must install Hadoop or use only jar files ?
>
> > Date: Mon, 12 Mar 2012 12:46:09 +0100
> > Subject: RE: Java Programming and Hbase
> > From: nkeywal@gmail.com
> > To: user@hbase.apache.org
> >
> > You will need the hadoop jar for this. Hbase uses hadoop for common stuff
> > like the configuration you've seen, so even a simple client needs it.
> >
> > N.
> > Le 12 mars 2012 12:06, "Mahdi Negahi" <ne...@hotmail.com> a
> écrit :
> >
> > >
> > > Is it necessary to install hadoop for hbase, if  want use Hbase in my
> > > laptop and use it via Java ?????
> > >
> > > > Date: Mon, 12 Mar 2012 10:43:44 +0100
> > > > Subject: Re: Java Programming and Hbase
> > > > From: khiemu@googlemail.com
> > > > To: user@hbase.apache.org
> > > >
> > > > you also need to import hadoop.jar, since hbase runs on hahoop
> > > >
> > > >
> > > >
> > > > On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <
> negahi.mahdi@hotmail.com
> > > >wrote:
> > > >
> > > > >
> > > > > Dear Friends
> > > > >
> > > > >
> > > > > I try to write a simple application with Java and manipulate my
> Hbase
> > > > > table. so I read this post and try to follow it.
> > > > >
> > > > > http://hbase.apache.org/docs/current/api/index.html
> > > > >
> > > > > I use eclipse and add hbase-092.0.jar as external jar file for my
> > > project.
> > > > > but i have problem in the first line of guideline. the following
> code
> > > line
> > > > > Configuration config = HBaseConfiguration.create();
> > > > >
> > > > > has a following error
> > > > >
> > > > > The type org.apache.hadoop.conf.Configuration cannot be resolved.
> It is
> > > > > indirectly referenced from required .class files
> > > > >
> > > > > and Configuration's package that eclipse want to add to my project
> is
> > > > >
> > > > > import javax.security.auth.login.Configuration;
> > > > >
> > > > > i think it is not an appropriate package.
> > > > >
> > > > > please advice me and refer me to new guideline.
> > > > >
> > >
>
>

RE: Java Programming and Hbase

Posted by Mahdi Negahi <ne...@hotmail.com>.
I so confused. I must install Hadoop or use only jar files ?

> Date: Mon, 12 Mar 2012 12:46:09 +0100
> Subject: RE: Java Programming and Hbase
> From: nkeywal@gmail.com
> To: user@hbase.apache.org
> 
> You will need the hadoop jar for this. Hbase uses hadoop for common stuff
> like the configuration you've seen, so even a simple client needs it.
> 
> N.
> Le 12 mars 2012 12:06, "Mahdi Negahi" <ne...@hotmail.com> a écrit :
> 
> >
> > Is it necessary to install hadoop for hbase, if  want use Hbase in my
> > laptop and use it via Java ?????
> >
> > > Date: Mon, 12 Mar 2012 10:43:44 +0100
> > > Subject: Re: Java Programming and Hbase
> > > From: khiemu@googlemail.com
> > > To: user@hbase.apache.org
> > >
> > > you also need to import hadoop.jar, since hbase runs on hahoop
> > >
> > >
> > >
> > > On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <negahi.mahdi@hotmail.com
> > >wrote:
> > >
> > > >
> > > > Dear Friends
> > > >
> > > >
> > > > I try to write a simple application with Java and manipulate my Hbase
> > > > table. so I read this post and try to follow it.
> > > >
> > > > http://hbase.apache.org/docs/current/api/index.html
> > > >
> > > > I use eclipse and add hbase-092.0.jar as external jar file for my
> > project.
> > > > but i have problem in the first line of guideline. the following code
> > line
> > > > Configuration config = HBaseConfiguration.create();
> > > >
> > > > has a following error
> > > >
> > > > The type org.apache.hadoop.conf.Configuration cannot be resolved. It is
> > > > indirectly referenced from required .class files
> > > >
> > > > and Configuration's package that eclipse want to add to my project is
> > > >
> > > > import javax.security.auth.login.Configuration;
> > > >
> > > > i think it is not an appropriate package.
> > > >
> > > > please advice me and refer me to new guideline.
> > > >
> >
 		 	   		  

RE: Java Programming and Hbase

Posted by N Keywal <nk...@gmail.com>.
You will need the hadoop jar for this. Hbase uses hadoop for common stuff
like the configuration you've seen, so even a simple client needs it.

N.
Le 12 mars 2012 12:06, "Mahdi Negahi" <ne...@hotmail.com> a écrit :

>
> Is it necessary to install hadoop for hbase, if  want use Hbase in my
> laptop and use it via Java ?????
>
> > Date: Mon, 12 Mar 2012 10:43:44 +0100
> > Subject: Re: Java Programming and Hbase
> > From: khiemu@googlemail.com
> > To: user@hbase.apache.org
> >
> > you also need to import hadoop.jar, since hbase runs on hahoop
> >
> >
> >
> > On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <negahi.mahdi@hotmail.com
> >wrote:
> >
> > >
> > > Dear Friends
> > >
> > >
> > > I try to write a simple application with Java and manipulate my Hbase
> > > table. so I read this post and try to follow it.
> > >
> > > http://hbase.apache.org/docs/current/api/index.html
> > >
> > > I use eclipse and add hbase-092.0.jar as external jar file for my
> project.
> > > but i have problem in the first line of guideline. the following code
> line
> > > Configuration config = HBaseConfiguration.create();
> > >
> > > has a following error
> > >
> > > The type org.apache.hadoop.conf.Configuration cannot be resolved. It is
> > > indirectly referenced from required .class files
> > >
> > > and Configuration's package that eclipse want to add to my project is
> > >
> > > import javax.security.auth.login.Configuration;
> > >
> > > i think it is not an appropriate package.
> > >
> > > please advice me and refer me to new guideline.
> > >
>

RE: Java Programming and Hbase

Posted by Mahdi Negahi <ne...@hotmail.com>.
Is it necessary to install hadoop for hbase, if  want use Hbase in my laptop and use it via Java ?????

> Date: Mon, 12 Mar 2012 10:43:44 +0100
> Subject: Re: Java Programming and Hbase
> From: khiemu@googlemail.com
> To: user@hbase.apache.org
> 
> you also need to import hadoop.jar, since hbase runs on hahoop
> 
> 
> 
> On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <ne...@hotmail.com>wrote:
> 
> >
> > Dear Friends
> >
> >
> > I try to write a simple application with Java and manipulate my Hbase
> > table. so I read this post and try to follow it.
> >
> > http://hbase.apache.org/docs/current/api/index.html
> >
> > I use eclipse and add hbase-092.0.jar as external jar file for my project.
> > but i have problem in the first line of guideline. the following code line
> > Configuration config = HBaseConfiguration.create();
> >
> > has a following error
> >
> > The type org.apache.hadoop.conf.Configuration cannot be resolved. It is
> > indirectly referenced from required .class files
> >
> > and Configuration's package that eclipse want to add to my project is
> >
> > import javax.security.auth.login.Configuration;
> >
> > i think it is not an appropriate package.
> >
> > please advice me and refer me to new guideline.
> >
 		 	   		  

Re: Java Programming and Hbase

Posted by kim young ill <kh...@googlemail.com>.
you also need to import hadoop.jar, since hbase runs on hahoop



On Mon, Mar 12, 2012 at 9:45 AM, Mahdi Negahi <ne...@hotmail.com>wrote:

>
> Dear Friends
>
>
> I try to write a simple application with Java and manipulate my Hbase
> table. so I read this post and try to follow it.
>
> http://hbase.apache.org/docs/current/api/index.html
>
> I use eclipse and add hbase-092.0.jar as external jar file for my project.
> but i have problem in the first line of guideline. the following code line
> Configuration config = HBaseConfiguration.create();
>
> has a following error
>
> The type org.apache.hadoop.conf.Configuration cannot be resolved. It is
> indirectly referenced from required .class files
>
> and Configuration's package that eclipse want to add to my project is
>
> import javax.security.auth.login.Configuration;
>
> i think it is not an appropriate package.
>
> please advice me and refer me to new guideline.
>