hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Hunt <ph...@apache.org>
Subject Re: Errors when run zookeeper in windows ?
Date Wed, 19 Aug 2009 16:05:20 GMT
One more thing, please enter a jira on this so that we can track/fix it.

https://issues.apache.org/jira/browse/ZOOKEEPER

Thanks,

Patrick

Patrick Hunt wrote:
> I suspect it has to do with the classpath - specifically having spaces 
> in the directory name. Notice that one of the lines you included starts 
> "Files\Java\" - that probably should be "...\Program Files\Java\..." and 
> the space is causing problems.
> 
> Try using David's dos specific file, or edit the start script 
> (bin/zk*.sh) to put quotes around the classpath, like in zkServer.sh
> 
>     -cp $CLASSPATH $JVMFLAGS $ZOOMAIN $ZOOCFG &
> 
> change to
> 
>     -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN $ZOOCFG &
> 
> and see if that helps (you might have to play with it a bit, but I 
> suspect this will work).
> 
> zkEnv.sh you may need to put quotes as well:
> CLASSPATH="$ZOOCFGDIR:$CLASSPATH"
> 
> 
> Patrick
> 
> zhang jianfeng wrote:
>> Yes,I am using cygwin and JDK 1.6,
>>
>> the command to start HBase is the same as in the get started:
>> bin/zkServer.sh start
>>
>> The following is the whole message:
>>
>> zjffdu@zjf ~/zookeeper-3.1.1
>> $ *bin/zkServer.sh start*
>> JMX enabled by default
>> Starting zookeeper ... STARTED
>>
>> zjffdu@zjf ~/zookeeper-3.1.1
>> $ java.lang.NoClassDefFoundError:
>> Files\Java\jre6\lib\ext\QTJava/zip;D:\Java\lib\hadoop-0/18/0\build\tools:/home/zjffdu/zookeeper-3/1/1/bin////zookeeper-3/1/1/jar:/home/zjffdu/zookeeper-3/1/1/bin////lib/junit-4/4/jar:/home/zjffdu/zookeeper-3/1/1/bin////lib/log4j-1/2/15/jar:/home/zjffdu/zookeeper-3/1/1/bin////src/java/lib/junit-4/4/jar:/home/zjffdu/zookeeper-3/1/1/bin////src/java/lib/log4j-1/2/15/jar

>>
>> Caused by: java.lang.ClassNotFoundException:
>> Files\Java\jre6\lib\ext\QTJava.zip;D:\Java\lib\hadoop-0.18.0\build\tools:.home.zjffdu.zookeeper-3.1.1.bin....zookeeper-3.1.1.jar:.home.zjffdu.zookeeper-3.1.1.bin....lib.junit-4.4.jar:.home.zjffdu.zookeeper-3.1.1.bin....lib.log4j-1.2.15.jar:.home.zjffdu.zookeeper-3.1.1.bin....src.java.lib.junit-4.4.jar:.home.zjffdu.zookeeper-3.1.1.bin....src.java.lib.log4j-1.2.15.jar

>>
>>         at java.net.URLClassLoader$1.run(Unknown Source)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at java.net.URLClassLoader.findClass(Unknown Source)
>>         at java.lang.ClassLoader.loadClass(Unknown Source)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>         at java.lang.ClassLoader.loadClass(Unknown Source)
>>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>> Could not find the main class:
>> Files\Java\jre6\lib\ext\QTJava.zip;D:\Java\lib\hadoop-0.18.0\build\tools:/home/zjffdu/zookeeper-3.1.1/bin/../zookeeper-3.1.1.jar:/home/zjffdu/zookeeper-3.1.1/bin/../lib/junit-4.4.jar:/home/zjffdu/zookeeper-3.1.1/bin/../lib/log4j-1.2.15.jar:/home/zjffdu/zookeeper-3.1.1/bin/../src/java/lib/junit-4.4.jar:/home/zjffdu/zookeeper-3.1.1/bin/../src/java/lib/log4j-1.2.15.jar.

>>
>> Program will exit.
>> $
>>
>>
>>
>> Thank you
>>
>> Jeff zhang
>>
>>
>> On Tue, Aug 18, 2009 at 12:53 PM, Patrick Hunt <phunt@apache.org> wrote:
>>
>>> you are using java 1.6 right? more detail on the class not found 
>>> would be
>>> useful (is that missing or just not included in your email?) Also the
>>> command line you're using to start the app would be interesting.
>>>
>>> Patrick
>>>
>>>
>>> Mahadev Konar wrote:
>>>
>>>> Hi Zhang,
>>>>  Are you using cygwin?
>>>>
>>>> mahadev
>>>>
>>>>
>>>> On 8/17/09 11:23 PM, "zhang jianfeng" <zjffdu@gmail.com> wrote:
>>>>
>>>>  Hi all,
>>>>> I tried to run zookeeper in windows, but the following errors appears:
>>>>>
>>>>>
>>>>> /*****************************************************************************

>>>>>
>>>>>
>>>>> ******************************************************************************>

>>>>>
>>>> *
>>>>
>>>>> $ java.lang.NoClassDefFoundError:
>>>>>
>>>>> Files\Java\jre6\lib\ext\QTJava/zip;D:\Java\lib\hadoop-0/18/0\build\tools:/home

>>>>>
>>>>>
>>>>> /zjffdu/zookeeper-3/1/1/bin////zookeeper-3/1/1/jar:/home/zjffdu/zookeeper-3/1/

>>>>>
>>>>>
>>>>> 1/bin////lib/junit-4/4/jar:/home/zjffdu/zookeeper-3/1/1/bin////lib/log4j-1/2/1

>>>>>
>>>>>
>>>>> 5/jar:/home/zjffdu/zookeeper-3/1/1/bin////src/java/lib/junit-4/4/jar:/home/zjf

>>>>>
>>>>> fdu/zookeeper-3/1/1/bin////src/java/lib/log4j-1/2/15/jar
>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>
>>>>> Files\Java\jre6\lib\ext\QTJava.zip;D:\Java\lib\hadoop-0.18.0\build\tools:.home

>>>>>
>>>>>
>>>>> .zjffdu.zookeeper-3.1.1.bin....zookeeper-3.1.1.jar:.home.zjffdu.zookeeper-3.1.

>>>>>
>>>>>
>>>>> 1.bin....lib.junit-4.4.jar:.home.zjffdu.zookeeper-3.1.1.bin....lib.log4j-1.2.1

>>>>>
>>>>>
>>>>> 5.jar:.home.zjffdu.zookeeper-3.1.1.bin....src.java.lib.junit-4.4.jar:.home.zjf

>>>>>
>>>>> fdu.zookeeper-3.1.1.bin....src.java.lib.log4j-1.2.15.jar
>>>>>        at java.net.URLClassLoader$1.run(Unknown Source)
>>>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>>>        at java.net.URLClassLoader.findClass(Unknown Source)
>>>>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>>        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>>>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>>>> Could not find the main class:
>>>>>
>>>>> Files\Java\jre6\lib\ext\QTJava.zip;D:\Java\lib\hadoop-0.18.0\build\tools:/home

>>>>>
>>>>>
>>>>> /zjffdu/zookeeper-3.1.1/bin/../zookeeper-3.1.1.jar:/home/zjffdu/zookeeper-3.1.

>>>>>
>>>>>
>>>>> 1/bin/../lib/junit-4.4.jar:/home/zjffdu/zookeeper-3.1.1/bin/../lib/log4j-1.2.1

>>>>>
>>>>>
>>>>> 5.jar:/home/zjffdu/zookeeper-3.1.1/bin/../src/java/lib/junit-4.4.jar:/home/zjf

>>>>>
>>>>> fdu/zookeeper-3.1.1/bin/../src/java/lib/log4j-1.2.15.jar.
>>>>> Program will exit.
>>>>>
>>>>>
>>>>> /*****************************************************************************

>>>>>
>>>>>
>>>>> ******************************************************************************>

>>>>>
>>>> *
>>>>
>>>>> It looks like my JAVA_HOME is not set correctly, anyone have any 
>>>>> ideas?
>>>>>
>>>>>
>>>>> Thank you
>>>>>
>>>>>
>>>>> Jeff zhang
>>>>>
>>>>
>>

Mime
View raw message