0

I am using talend open studio,My job consists of sqoop and hdfsoutput. I am trying to push the data from ms-SQL server to hadoop hdfs using sqoop I have set the configurations.But when i run the job i get the below error

14/02/06 16:23:12 INFO tool.CodeGenTool: Beginning code generation
14/02/06 16:23:13 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM [Resource_Dim] AS t WHERE 1=0
14/02/06 16:23:13 INFO orm.CompilationManager: $HADOOP_MAPRED_HOME is not set
14/02/06 16:23:13 ERROR orm.CompilationManager: It seems as though you are running sqoop with a JRE.
14/02/06 16:23:13 ERROR orm.CompilationManager: Sqoop requires a JDK that can compile Java code.
14/02/06 16:23:13 ERROR orm.CompilationManager: Please install a JDK and set $JAVA_HOME to use it.
14/02/06 16:23:13 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not start Java compiler.
                at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:176)
                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 sampleproj.sqoopconnect_0_1.SqoopConnect.tSqoopImport_1Process(SqoopConnect.java:435)
                at sampleproj.sqoopconnect_0_1.SqoopConnect.tLibraryLoad_1Process(SqoopConnect.java:357)
                at sampleproj.sqoopconnect_0_1.SqoopConnect.runJobInTOS(SqoopConnect.java:877)
                at sampleproj.sqoopconnect_0_1.SqoopConnect.main(SqoopConnect.java:743)

Exception in component tSqoopImport_1
java.lang.Exception: The Sqoop import job has failed
                at sampleproj.sqoopconnect_0_1.SqoopConnect.tSqoopImport_1Process(SqoopConnect.java:437)
                at sampleproj.sqoopconnect_0_1.SqoopConnect.tLibraryLoad_1Process(SqoopConnect.java:357)
                at sampleproj.sqoopconnect_0_1.SqoopConnect.runJobInTOS(SqoopConnect.java:877)
                at sampleproj.sqoopconnect_0_1.SqoopConnect.main(SqoopConnect.java:743)

JDK is installed in the system not jre still i am getting the above error.I have try to run the same thing using sqoop command line and i am able to run the job successfully. But when i run using talend the above error is displayed. Please guide as how to solve this error.
I am using CDH4.5 and Talend Open Studio For BigData 5.3.1

Bhagwant Bhobe
  • 81
  • 4
  • 11
  • What does "echo $JAVA_HOME" say? – cyroxx Feb 07 '14 at 15:04
  • Also, this question seems to be a duplicate of [It seems as though you are running sqoop with a JRE - But JAVA_HOME set to JDK](http://stackoverflow.com/q/16101967/1388240) – cyroxx Feb 07 '14 at 15:07

1 Answers1

0

In the Preferences of Talend Studio, Java Path was set to JRE , just changed that path from JRE to JDK , that resolved my issue.

Thanks, Bhagwant Bhobe

Bhagwant Bhobe
  • 81
  • 4
  • 11