Reply
New Contributor
Posts: 4
Registered: ‎01-19-2016

Sqoop fails with "Invalid SQL type: sqlKind = UNINITIALIZED"

Hello everybody,

 

I've configured an Oozie workflow to run this Sqoop job:

 

<workflow-app name="My_Sqoop_Workflow" xmlns="uri:oozie:workflow:0.5">
    <start to="sqoop-0e79"/>
    <kill name="Kill">
        <message>Error al realizar la acción. Mensaje de error [${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <action name="sqoop-0e79">
        <sqoop xmlns="uri:oozie:sqoop-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
				<arg>import</arg>
				<arg>--connect</arg>
				<arg>jdbc:oracle:thin:@//URL</arg>
				<arg>--direct</arg>
				<arg>--verbose</arg>
				<arg>--target-dir</arg>
				<arg>/user/hue_amx/sqoop/tables/ALMS</arg>
				<arg>-num-mappers</arg>
				<arg>6</arg>
				<arg>-username</arg>
				<arg>USER</arg>
				<arg>-password</arg>
				<arg>PASS</arg>
				<arg>--query</arg>
				<arg>'select * from RACING.ALMS WHERE $CONDITIONS'</arg>
				<arg>--split-by</arg>
				<arg>ALM</arg>
        </sqoop>
        <ok to="End"/>
        <error to="Kill"/>
    </action>
    <end name="End"/>
</workflow-app>

The Sqoop command works fine if ran from command prompt, but when I run from oozie I've the following LOG:

 

Sqoop command arguments :
             import
             --connect
             jdbc:oracle:thin:@//URL
             --direct
             --verbose
             --target-dir
             /user/hue_amx/sqoop/tables/ALMS
             -num-mappers
             6
             -username
             USER
             -password
             PASS
             --query
             'select * from RACING.ALMS WHERE $CONDITIONS'
             --split-by
             ALM
Fetching child yarn jobs
tag id : oozie-7a6209828472963ad3ca166727005149
Child yarn jobs are found -

 

 =================================================================

>>> Invoking Sqoop command line now >>>

2571 [uber-SubtaskRunner] WARN  org.apache.sqoop.tool.SqoopTool  - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
2587 [uber-SubtaskRunner] INFO  org.apache.sqoop.Sqoop  - Running Sqoop version: 1.4.6-cdh5.5.1
2596 [uber-SubtaskRunner] DEBUG org.apache.sqoop.tool.BaseSqoopTool  - Enabled debug logging.
2596 [uber-SubtaskRunner] WARN  org.apache.sqoop.tool.BaseSqoopTool  - Setting your password on the command-line is insecure. Consider using -P instead.
2603 [uber-SubtaskRunner] WARN  org.apache.sqoop.ConnFactory  - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
2607 [uber-SubtaskRunner] DEBUG org.apache.sqoop.ConnFactory  - Loaded manager factory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
2614 [uber-SubtaskRunner] DEBUG org.apache.sqoop.ConnFactory  - Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
2615 [uber-SubtaskRunner] DEBUG org.apache.sqoop.ConnFactory  - Trying ManagerFactory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
2639 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.oracle.OraOopManagerFactory  - Data Connector for Oracle and Hadoop can be called by Sqoop!
2640 [uber-SubtaskRunner] DEBUG org.apache.sqoop.ConnFactory  - Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
2640 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.DefaultManagerFactory  - Trying with scheme: jdbc:oracle:thin:@
2648 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.OracleManager$ConnCache  - Instantiated new connection cache.
2648 [uber-SubtaskRunner] INFO  org.apache.sqoop.manager.SqlManager  - Using default fetchSize of 1000
2648 [uber-SubtaskRunner] DEBUG org.apache.sqoop.ConnFactory  - Instantiated ConnManager org.apache.sqoop.manager.OracleManager@55b422f9
2648 [uber-SubtaskRunner] INFO  org.apache.sqoop.tool.CodeGenTool  - Beginning code generation
2653 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.SqlManager  - Execute getColumnInfoRawQuery : 'select * from RACING.ALMS WHERE  (1 = 0) '
2706 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.OracleManager  - Creating a new connection for jdbc:oracle:thin:@//exa1-scan.claro.amx:1521/RAC8.WORLD, using username: USER
2706 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.OracleManager  - No connection paramenters specified. Using regular API for making connection.
2944 [uber-SubtaskRunner] INFO  org.apache.sqoop.manager.OracleManager  - Time zone has been set to GMT
2990 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.SqlManager  - Using fetchSize for next query: 1000
2990 [uber-SubtaskRunner] INFO  org.apache.sqoop.manager.SqlManager  - Executing SQL statement: 'select * from RACING.ALMS WHERE  (1 = 0) '
2991 [uber-SubtaskRunner] ERROR org.apache.sqoop.manager.SqlManager  - Error executing statement: java.sql.SQLException: Invalid SQL type: sqlKind = UNINITIALIZED
java.sql.SQLException: Invalid SQL type: sqlKind = UNINITIALIZED
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:78)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1046)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
    at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:758)
    at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:767)
    at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270)
    at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:241)
    at org.apache.sqoop.manager.SqlManager.getColumnTypesForQuery(SqlManager.java:234)
    at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:336)
    at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1834)
    at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1646)
    at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
    at org.apache.oozie.action.hadoop.SqoopMain.runSqoopJob(SqoopMain.java:197)
    at org.apache.oozie.action.hadoop.SqoopMain.run(SqoopMain.java:177)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:49)
    at org.apache.oozie.action.hadoop.SqoopMain.main(SqoopMain.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:378)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:296)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:181)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:224)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
2993 [uber-SubtaskRunner] ERROR org.apache.sqoop.tool.ImportTool  - Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter
    at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1652)
    at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
    at org.apache.oozie.action.hadoop.SqoopMain.runSqoopJob(SqoopMain.java:197)
    at org.apache.oozie.action.hadoop.SqoopMain.run(SqoopMain.java:177)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:49)
    at org.apache.oozie.action.hadoop.SqoopMain.main(SqoopMain.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:378)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:296)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:181)
    at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:224)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

2993 [uber-SubtaskRunner] DEBUG org.apache.sqoop.manager.OracleManager$ConnCache  - Caching released connection for jdbc:oracle:thin:@//URL/USER
Intercepting System.exit(1)

<<< Invocation of Main class completed <<<

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]

Oozie Launcher failed, finishing Hadoop job gracefully

Oozie Launcher, uploading action data to HDFS sequence file: hdfs://URL:8020/user/hue_amx/oozie-clou/0000013-160302115504248-oozie-clou-W/sqoop-0e79--sqoop/action-data.seq

Oozie Launcher ends

 

 

Can you help me with this problem?

 

Highlighted
Explorer
Posts: 24
Registered: ‎11-03-2015

Re: Sqoop fails with "Invalid SQL type: sqlKind = UNINITIALIZED"

Hi, did you manage to resolve this ? I've got the same error
Explorer
Posts: 7
Registered: ‎05-12-2016

Re: Sqoop fails with "Invalid SQL type: sqlKind = UNINITIALIZED"

I do have same problem kindly let me know.

Announcements