RE: Hadoop does not start on Windows XP

2012-02-08 Thread Sandy Pratt
If I'm reading this right, you might be having problems with spaces in your 
pathes (probably the Java path).

A solution is discussed here: http://hbase.apache.org/docs/r0.20.6/cygwin.html. 
 Basically make a symlink in the Cygwin file system to the JDK in Windows, 
and use that symlink as JAVA_HOME.



 -Original Message-
 From: Jay [mailto:su1...@yahoo.com]
 Sent: Monday, February 06, 2012 19:54
 To: common-user@hadoop.apache.org
 Subject: Re: Hadoop does not start on Windows XP
 
 Hi Ron,
 
 Thank you. I deleted the Hadoop directory from my Windows folder.
 The untar/unzipped on Cygwin ad the directory d:\hadoop
 
 (Ex: here is a path: D:\Hadoop\hadoop-1.0.0\bin\ )
 
 Now I could start Hadoop:
 $ bin/hadoop start-all.sh
 
 Above worked.
 But similar problem persists:
 $ bin/hadoop fs -ls
 bin/hadoop: line 321: c:\Program: command not found Found 26 items
 
 $ bin/hadoop dfs -mkdir urls
 cygwin warning:
   MS-DOS style path detected: D:\Hadoop\hadoop-1.0.0\/build/native
   Preferred POSIX equivalent is: /cygdrive/d/Hadoop/hadoop-
 1.0.0/build/native
   CYGWIN environment variable option nodosfilewarning turns off this
 warning.
   Consult the user's guide for more details about POSIX paths:
     http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
 bin/hadoop: line 321: c:\Program: command not found
 
 How could I possibly get rid of the error?
 Btw,
 
 $ bin=`dirname .`
 
 /cygdrive/d/Hadoop/hadoop-1.0.0
 $ echo $bin
 .
 /cygdrive/d/Hadoop/hadoop-1.0.0
 $ pwd
 /cygdrive/d/Hadoop/hadoop-1.0.0
 
 
 Thanks,
 Jay
 
 
 
 
  From: Ronald Petty ronald.pe...@gmail.com
 To: common-user@hadoop.apache.org; Jay su1...@yahoo.com
 Sent: Sunday, February 5, 2012 4:28 PM
 Subject: Re: Hadoop does not start on Windows XP
 
 Jay,
 
 What does the following give you on the command line?
 
 bin=`dirname $0`   //also try =`dirname .`
 
 echo $bin
 
 Regards.
 
 Ron
 
 On Sat, Feb 4, 2012 at 10:56 PM, Jay su1...@yahoo.com wrote:
 
  Hi,
 
  In Windows XP I installed Cygwin and tried to run Hadoop:
 
  W1234@W19064-00 /cygdrive/d/Profiles/w1234/My
  Documents/Hadoop/hadoop1.0/hadoop-1.0.0
  $ bin/hadoop start-all.sh
  bin/hadoop: line 2: $'\r': command not found
  bin/hadoop: line 17: $'\r': command not found
  bin/hadoop: line 18: $'\r': command not found
  bin/hadoop: line 49: $'\r': command not found
  : No such file or directoryn
  bin/hadoop: line 52: $'\r': command not found
  bin/hadoop: line 60: syntax error near unexpected token `$'in\r''
  'in/hadoop: line 60: `case `uname` in $
 
 
  I have this in the file hadoop-env.sh
 
  export JAVA_HOME=c:\\Program\ Files\\Java\\jdk1.7.0_02
 
  How could I possibly fix it?
 
  Thanks a lot!
 


RE: ClassNotFoundException while running quick start guide on Windows.

2011-06-22 Thread Sandy Pratt
Hi Drew,

I don't know if this is actually the issue or not, but the output below makes 
me think you might be passing Cygwin pathes into the java.exe launcher.  If 
that's the case, it won't work.  java.exe is pure Windows and doesn't know 
about '/cygdrive/c' for example (it also expects the path separator to be 
semicolon rather than colon).  Every once in a while when I try to use java.exe 
from the Cygwin CLI on my Windows box, I get bitten by this.

Sandy

 -Original Message-
 From: Drew Gross [mailto:drew.a.gr...@gmail.com]
 Sent: Tuesday, June 21, 2011 21:26
 To: common-user@hadoop.apache.org
 Subject: Re: ClassNotFoundException while running quick start guide on
 Windows.
 
 Thanks Jeff, it was a problem with JAVA_HOME. I have another problem now
 though, I have this:
 
 $JAVA:  /cygdrive/c/Program Files/Java/jdk1.6.0_26/bin/java
 $JAVA_HEAP_MAX:  -Xmx1000m
 $HADOOP_OPTS:  -Dhadoop.log.dir=C:\Users\Drew
 Gross\Documents\Projects\discom\hadoop-0.21.0\logs
 -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=C:\Users\Drew
 Gross\Documents\Projects\discom\hadoop-0.21.0\ -Dhadoop.id.str= -
 Dhadoop.root.logger=INFO,console
  -Djava.library.path=/cygdrive/c/Users/Drew
 Gross/Documents/Projects/discom/hadoop-0.21.0/lib/native/
 -Dhadoop.policy.file=hadoop-policy.xml
 $CLASS:  org.apache.hadoop.util.RunJar
 Exception in thread main java.lang.NoClassDefFoundError:
 Gross\Documents\Projects\discom\hadoop-0/21/0\logs
 Caused by: java.lang.ClassNotFoundException:
 Gross\Documents\Projects\discom\hadoop-0.21.0\logs
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 Could not find the main class:
 Gross\Documents\Projects\discom\hadoop-0.21.0\logs.  Program will exit.
 
 (This is with some extra debugging info added by me in bin/hadoop)
 
 It looks like the windows style file names are causing problems, especially 
 the
 spaces. Has anyone encountered this before, and know how to fix? I tried
 escaping the spaces and surrounding the file paths with quotes (not at the
 same time), but that didn't help.
 
 Drew
 
 
 On Tue, Jun 21, 2011 at 6:24 AM, madhu phatak phatak@gmail.com
 wrote:
 
  I think the jar have some issuses where its not able to read the Main
  class from manifest . try unjar the jar and see in Manifest.xml what
  is the main class and then run as follows
 
   bin/hadoop jar hadoop-*-examples.jar Full qualified main class grep
  input output 'dfs[a-z.]+'
  On Thu, Jun 16, 2011 at 10:23 AM, Drew Gross drew.a.gr...@gmail.com
 wrote:
 
   Hello,
  
   I'm trying to run the example from the quick start guide on Windows
   and I get this error:
  
   $ bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'
   Exception in thread main java.lang.NoClassDefFoundError:
   Caused by: java.lang.ClassNotFoundException:
          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          at
   sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   Could not find the main class: .  Program will exit.
   Exception in thread main java.lang.NoClassDefFoundError:
   Gross\Documents\Projects\discom\hadoop-0/21/0\logs
   Caused by: java.lang.ClassNotFoundException:
   Gross\Documents\Projects\discom\hadoop-0.21.0\logs
          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          at
   sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   Could not find the main class:
   Gross\Documents\Projects\discom\hadoop-0.21.0\logs.  Program will
 exit.
  
   Does anyone know what I need to change?
  
   Thank you.
  
   From, Drew
  
   --
   Forget the environment. Print this e-mail immediately. Then burn it.
  
 
 
 
 --
 Forget the environment. Print this e-mail immediately. Then burn it.