none
Issue with Sqoop command aliases (*.cmd)

    Question

  • Hello,

    I'm currently using HDInsight on the local server, and having troubles using Sqoop *.cmd batches.
    Namely, I'm perfectly able to run sqoop directly (e.g. sqoop import --connect...), however I'm receiving the following error calling simple sqoop-help.cmd from C:\Hadoop\sqoop-1.4.2\ folder:

    c:\Hadoop\sqoop-1.4.2\bin>sqoop-help.cmd
    The system cannot find the path specified.
    'c:\Hadoop\sqoop-1.4.2\bin\' is not recognized as an internal or external command,
    operable program or batch file.
    Setting HBASE_HOME to
    Warning: HBASE_HOME [c:\hadoop\hadoop-1.1.0-SNAPSHOT\hbase-0.94.2] does not exis
    t HBase imports will fail.
    Please set HBASE_HOME to the root of your HBase installation.
    Setting ZOOKEEPER_HOME to
    Warning: ZOOKEEPER_HOME [c:\hadoop\hadoop-1.1.0-SNAPSHOT\zookeeper-3.4.3] does n
    ot exist
    Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
    Exception in thread "main" java.lang.NoClassDefFoundError: \//\conf;c:\Hadoop\sq
    oop-1/4/2\bin"c:\Hadoop\sqoop-1/4/2\bin\;;;c:\Hadoop\sqoop-1/4/2\bin
    Caused by: java.lang.ClassNotFoundException: \..\conf;c:\Hadoop\sqoop-1.4.2\bin"
    c:\Hadoop\sqoop-1.4.2\bin\;;;c:\Hadoop\sqoop-1.4.2\bin
            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: \..\conf;c:\Hadoop\sqoop-1.4.2\bin"c:\Hadoop\sqoo
    p-1.4.2\bin\;;;c:\Hadoop\sqoop-1.4.2\bin.  Program will exit.

    Is there something I need to configure additionally, in order of those batches to work?
    Thank you in advance for any feedback and suggestions!

    Wlodek

    Monday, December 24, 2012 1:46 PM

All replies

  • Seems to me, some issue with the execution of sqoop-help.cmd 

    setlocal 
    set prgm=%~f0 
    set bin=%~dp0 
    if "%bin:~-1%" == "\" ( 
    set bin=%bin:~0,-1% 

    call "%bin%\sqoop.cmd" help %* 

    Instead try this 

    C:\hadoop\sqoop-1.4.2> . bin\sqoop.cmd help

    Friday, March 08, 2013 9:36 PM