Quantcast

Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

zenbowman
I downloaded the latest stable hbase 0.94.8 and followed the instructions for getting started.

However, when I try to run hbase I get the following.

ubuntu:~/dev/hadoop/hbase-0.94.8$ ./bin/start-hbase.sh Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty starting master, logging to /home/psamtani/dev/hadoop/hbase-0.94.8/bin/../logs/hbase-psamtani-master-ubuntu.out Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty localhost: ssh: connect to host localhost port 22: Connection refused

I have Java 7 installed and run hadoop and hive on my local box for testing with no issues.

@ubuntu:~/dev/hadoop/hbase-0.94.8$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)


Does HBase not run on Java 7?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

Jean-Marc Spaggiari
Hi,

HBase should be working with JDK 7, however it's so far only
supporting JDK 6. The issue you are facing below is mode probably not
JDK related. Can you describe the steps you followed?

JM

2013/6/3 zenbowman <[hidden email]>:

> I downloaded the latest stable hbase 0.94.8 and followed the instructions for
> getting started.
>
> However, when I try to run hbase I get the following.
>
> /ubuntu:~/dev/hadoop/hbase-0.94.8$ ./bin/start-hbase.sh Error: Could not
> find or load main class org.apache.hadoop.hbase.util.GetJavaProperty Error:
> Could not find or load main class
> org.apache.hadoop.hbase.util.GetJavaProperty starting master, logging to
> /home/psamtani/dev/hadoop/hbase-0.94.8/bin/../logs/hbase-psamtani-master-ubuntu.out
> Error: Could not find or load main class
> org.apache.hadoop.hbase.util.GetJavaProperty localhost: ssh: connect to host
> localhost port 22: Connection refused/
>
> I have Java 7 installed and run hadoop and hive on my local box for testing
> with no issues.
>
> /@ubuntu:~/dev/hadoop/hbase-0.94.8$ java -version
> java version "1.7.0_21"
> Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
> /
>
> Does HBase not run on Java 7?
>
>
>
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/Error-Could-not-find-or-load-main-class-org-apache-hadoop-hbase-util-GetJavaProperty-tp4045637.html
> Sent from the HBase User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

zenbowman
Hi Jean-Marc,

I downloaded the tarball, extracted it, modified the conf/hbase-site.xml as follows:


<configuration>

  <property>
    <name>hbase.rootdir</name>
    <value>/home/psamtani/dev/hadoop/hbase-data/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/psamtani/dev/hadoop/hbase-data/zookeeper</value>
  </property>

</configuration>


And then tried to start hbase
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

Jean-Marc Spaggiari
Can you try to start it right after the extraction? Don't even modify anything.

Extract, export JAVA_HOME, run.

If this is working, we will take a look at why you configuration below
is not working.

You can also update the JAVA_HOME in hbase-env.sh.

JM

2013/6/3 zenbowman <[hidden email]>:

> Hi Jean-Marc,
>
> I downloaded the tarball, extracted it, modified the conf/hbase-site.xml as
> follows:
>
> /
> <configuration>
>
>   <property>
>     <name>hbase.rootdir</name>
>     <value>/home/psamtani/dev/hadoop/hbase-data/hbase</value>
>   </property>
>   <property>
>     <name>hbase.zookeeper.property.dataDir</name>
>     <value>/home/psamtani/dev/hadoop/hbase-data/zookeeper</value>
>   </property>
>
> </configuration>
> /
>
> And then tried to start hbase
>
>
>
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/Error-Could-not-find-or-load-main-class-org-apache-hadoop-hbase-util-GetJavaProperty-tp4045637p4045639.html
> Sent from the HBase User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

zenbowman
Still the same, thanks for your help though
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

Jean-Marc Spaggiari
There is something wrong with your configuration.

Here is what I get on my side:

#:~/foo$ wget http://apache.mirror.rafal.ca/hbase/hbase-0.94.8/hbase-0.94.8.tar.gz
--2013-06-03 13:41:30--
http://apache.mirror.rafal.ca/hbase/hbase-0.94.8/hbase-0.94.8.tar.gz
Resolving apache.mirror.rafal.ca (apache.mirror.rafal.ca)...
207.210.46.249, 2001:470:1d:3c0:216:3eff:fe3f:746a
Connecting to apache.mirror.rafal.ca
(apache.mirror.rafal.ca)|207.210.46.249|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 57691943 (55M) [application/x-gzip]
Saving to: `hbase-0.94.8.tar.gz'

100%[=>] 57,691,943  2.11M/s   in 35s

2013-06-03 13:42:06 (1.55 MB/s) - `hbase-0.94.8.tar.gz' saved
[57691943/57691943]

#:~/foo$ tar -xzf hbase-0.94.8.tar.gz
#:~/foo$ cd hbase-0.94.8/
#:~/foo/hbase-0.94.8$ export JAVA_HOME=/usr/local/jdk1.6.0_45/
#:~/foo/hbase-0.94.8$ bin/start-hbase.sh
starting master, logging to
/home/jmspaggiari/foo/hbase-0.94.8/bin/../logs/hbase-jmspaggiari-master-cloudera.out
#:~/foo/hbase-0.94.8$ echo version | bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.8, r1485407, Wed May 22 20:53:13 UTC 2013

version
0.94.8, r1485407, Wed May 22 20:53:13 UTC 2013


What's the result of echo $JAVA_HOME on you system? Also are you
running open JDK? Or Oracle JDK?

JM

2013/6/3 zenbowman <[hidden email]>:
> Still the same, thanks for your help though
>
>
>
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/Error-Could-not-find-or-load-main-class-org-apache-hadoop-hbase-util-GetJavaProperty-tp4045637p4045641.html
> Sent from the HBase User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

zenbowman
I'm running Oracle JDK


psamtani@ubuntu:~/dev/hadoop/hbase-0.94.8$ echo $JAVA_HOME
/usr/lib/jvm/java-7-oracle


I thought it might have been that I didn't have sshd running, but even after installing it the problem persists


psamtani@ubuntu:~/dev/hadoop/hbase-0.94.8$ ps -ef | grep ssh
psamtani  1979  1944  0 May23 ?        00:00:02 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session gnome-session --session=ubuntu
root     16558     1  0 10:50 ?        00:00:00 /usr/sbin/sshd -D
psamtani 17634  9622  0 11:05 pts/3    00:00:00 grep ssh
psamtani 30979  8663  0 May30 pts/5    00:00:00 ssh -l hadoop -e none 10.16.80.31
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

Jean-Marc Spaggiari
No, it's not sshd related.
Is it a packaged version of the JDK? Or a tar.gz version? If it's a
packaged version, can you try with the tar.gz version? I had issues in
the past with the packaged one...

JM


2013/6/3 zenbowman <[hidden email]>:

> I'm running Oracle JDK
>
> /
> psamtani@ubuntu:~/dev/hadoop/hbase-0.94.8$ echo $JAVA_HOME
> /usr/lib/jvm/java-7-oracle
> /
>
> I thought it might have been that I didn't have sshd running, but even after
> installing it the problem persists
>
> /
> psamtani@ubuntu:~/dev/hadoop/hbase-0.94.8$ ps -ef | grep ssh
> psamtani  1979  1944  0 May23 ?        00:00:02 /usr/bin/ssh-agent
> /usr/bin/dbus-launch --exit-with-session gnome-session --session=ubuntu
> root     16558     1  0 10:50 ?        00:00:00 /usr/sbin/sshd -D
> psamtani 17634  9622  0 11:05 pts/3    00:00:00 grep ssh
> psamtani 30979  8663  0 May30 pts/5    00:00:00 ssh -l hadoop -e none
> 10.16.80.31
> /
>
>
>
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/Error-Could-not-find-or-load-main-class-org-apache-hadoop-hbase-util-GetJavaProperty-tp4045637p4045643.html
> Sent from the HBase User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

zenbowman
It's a packaged version, but I have no problems running HIVE and Hadoop locally using it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty

Jean-Marc Spaggiari
If you have simply downloaded and extracted HBase the same way I did
below, then it's not coming from HBase since it's working for everyone
else.

There might be something with your installation/configuration.

Do you have any HADOOP_CLASSPATH or HBASE_CLASSPATH  declared? Is so,
can you remove it and retry?

Also, can you try this command?

HADOOP_IN_PATH= $(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH"
which hadoop 2>/dev/null); echo $HADOOP_IN_PATH

The only place with GetJavaProperty is called is there:
HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$CLASSPATH"
${HADOOP_IN_PATH} org.apache.hadoop.hbase.util.GetJavaProperty
java.library.path 2>/dev/null)
and this is only called if the command above is not null.

So I guess he command above is not null for you, else your error
message will not be displayed.

Can you also echo $HADOOP_CLASSPATH and CLASSPATH?

Thanks,

JM

2013/6/3 zenbowman <[hidden email]>:
> It's a packaged version, but I have no problems running HIVE and Hadoop
> locally using it.
>
>
>
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/Error-Could-not-find-or-load-main-class-org-apache-hadoop-hbase-util-GetJavaProperty-tp4045637p4045646.html
> Sent from the HBase User mailing list archive at Nabble.com.
Loading...