Home Forums HDP on Windows – Installation Sqoop SQL Server Import Error

This topic contains 4 replies, has 3 voices, and was last updated by  Seth Lyubich 9 months ago.

  • Creator
    Topic
  • #47330

    Manish Sharma
    Participant

    Hi Seth,

    I am trying to import SQLServer data to HDFS but all time getting Error,I am using HDP 1.3.0 for Windows,SQL Server 2005 and “sqljdbc4″ SQL Server JDBC connector (Microsoft JDBC Driver 4.0 for SQL Server).I have copied this connector to Sqoop lib folder.

    Below is the SQOOP IMPORT command which I am using to import SQL data to Hadoop cluster.

    sqoop import –connect “jdbc:sqlserver://MASTER:1433;database=Test;user=sa;password=abc@123” –table Emp

    ====================================== E R R O R I AM Getting ====================================================================
    c:\hdp\hadoop\sqoop-1.4.3.1.3.0.0-0380\bin>sqoop import –connect “jdbc:sqlserver://MASTER:1433;database=Test;user=sa;passw
    ord=abc@123” –table Emp -m 1
    14/01/23 19:02:59 INFO manager.SqlManager: Using default fetchSize of 1000
    14/01/23 19:02:59 INFO tool.CodeGenTool: Beginning code generation
    14/01/23 19:03:00 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM [Emp] AS t WHERE 1=0
    14/01/23 19:03:01 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is c:\hdp\hadoop\hadoop-1.2.0.1.3.0.0-0380
    14/01/23 19:03:01 INFO orm.CompilationManager: Found hadoop core jar at: c:\hdp\hadoop\hadoop-1.2.0.1.3.0.0-0380\hadoop-cor
    e.jar
    14/01/23 19:03:01 ERROR orm.CompilationManager: It seems as though you are running sqoop with a JRE.
    14/01/23 19:03:01 ERROR orm.CompilationManager: Sqoop requires a JDK that can compile Java code.
    14/01/23 19:03:01 ERROR orm.CompilationManager: Please install a JDK and set $JAVA_HOME to use it.
    14/01/23 19:03:01 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not start J
    ava compiler.
    at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:177)
    at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:83)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
    ============================================================================================================================

    All time its showing me the Error that “It seems as though you are running sqoop with a JRE” and “Please install a JDK and set $JAVA_HOME to use it”. Please assist me what I should do.
    I have set JAVA_HOME = C:\java\jdk1.6.0_31 while Installing HDP on Windows

    Thanks
    MANISH

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sqoop SQL Server Import Error’ is closed to new replies.

  • Author
    Replies
  • #47414

    Seth Lyubich
    Keymaster

    Hi Manish,

    Thanks for letting us know that your issue is resolved. Let’s use your other thread to discuss your Pentaho issue.

    Thanks,
    Seth

    Collapse
    #47409

    Manish Sharma
    Participant

    Hi Seth & Robert,

    Thanks for Responding me, I have successfully achieved my tasks, where I was getting Error.

    I am suffering with another issue which is related with Pentaho, I have successfully connected Pentaho with HIVE and generated a Report,But when I am trying to do the same with HDFS getting Error like “Unable to connect to HDFS Server”.

    I am using HDP 1.3.0 for Windows and Pentaho version 5.0.2. Could you please assist me how I can solve this issue.Yours immediate response will highly be appreciable.

    Thanks
    MANISH

    Collapse
    #47349

    Seth Lyubich
    Keymaster

    Hi Manish,

    Can you please check your Java version on the host you running this command from? From error message it looks like JDK is not installed:

    14/01/23 19:03:01 ERROR orm.CompilationManager: It seems as though you are running sqoop with a JRE.
    14/01/23 19:03:01 ERROR orm.CompilationManager: Sqoop requires a JDK that can compile Java code.
    14/01/23 19:03:01 ERROR orm.CompilationManager: Please install a JDK and set $JAVA_HOME to use it.
    14/01/23 19:03:01 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not start J
    ava compiler.

    Can you please try following command?

    C:\Java\jdk1.7.0_51>set | findstr JAVA
    JAVA_HOME=C:\Java\jdk1.7.0_51

    You should see JDK location.

    Thanks,
    Seth

    Collapse
    #47337

    Robert Molina
    Moderator

    Hi Manish,
    Can you verify that you have JDK installed and just the JRE? Typically, you would have the path like so, C:\Program Files\Java\jdk1.6.0_30\bin\javac.exe

    Hope this helps.

    Regards,
    Robert

    Collapse
Viewing 4 replies - 1 through 4 (of 4 total)