Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop, mail # user - Problem with Oracle JDBC driver and Sqoop compatibility


+
Ramkumar Subramanian 2013-09-24, 07:02
Copy link to this message
-
Re: Problem with Oracle JDBC driver and Sqoop compatibility
Jarek Jarcec Cecho 2013-09-26, 15:44
Hi Ramkumar,
I believe that the file ojdbc7.jar is compiled for JDK7 and as a result won't work on JDK6. Would you mind using the file ojdbc6.jar and trying the import command with parameter --verbose? It would be great if you could share the output with us.

Jarcec

On Tue, Sep 24, 2013 at 12:32:07PM +0530, Ramkumar Subramanian wrote:
> Hi,
>
>
>
> I am using Sqoop 1.4.2 to import data from oracle database Release 12C to
> Hive.
>
>
>
> Hadoop Version: CDH4.2.1
>
> Java Version: 1.6
>
>
>
> I am getting the following error with the Oracle JDBC driver, I tried with
> both ojdbc6.jar and ojdbc7.jar of Release 12C.
>
>
>
> *Tried list-databases to check for the connectivity:*
>
> [xxx@aster4 lib]$ sqoop list-databases  --connect
> jdbc:oracle:thin:@10.226.226.55:1521:orcl --username XXX -P
>
> Enter password:
>
> 13/09/23 20:34:17 INFO manager.SqlManager: Using default fetchSize of 1000
>
> 13/09/23 20:34:17 INFO manager.OracleManager: Time zone has been set to GMT
>
> 13/09/23 20:34:17 ERROR manager.OracleManager: Failed to rollback
> transaction
>
> java.sql.SQLException: Could not rollback with auto-commit set on
>
>         at
> oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:4510)
>
>         at
> org.apache.sqoop.manager.OracleManager.listDatabases(OracleManager.java:615)
>
>         at
> org.apache.sqoop.tool.ListDatabasesTool.run(ListDatabasesTool.java:49)
>
>         at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
>
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>
>         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)
>
> 13/09/23 20:34:17 ERROR manager.OracleManager: Failed to list databases
>
> java.sql.SQLException: Could not commit with auto-commit set on
>
>         at
> oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
>
>         at
> oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
>
>         at
> org.apache.sqoop.manager.OracleManager.listDatabases(OracleManager.java:612)
>
>         at
> org.apache.sqoop.tool.ListDatabasesTool.run(ListDatabasesTool.java:49)
>
>         at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
>
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>
>         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)
>
>
> ===========================================================>
>  sqoop import --connect jdbc:oracle:thin:@10.226.226.55:1521:orcl
> --username XXX -P --table ONESTAGING  --target-dir /user/user/ONE42
> --split-by ST_KEY
>
>         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)
>
> 13/09/23 20:40:55 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is
> /usr/lib/hadoop-0.20-mapreduce
>
> 13/09/23 20:40:55 INFO orm.CompilationManager: Found hadoop core jar at:
> /usr/lib/hadoop-0.20-mapreduce/hadoop-core.jar
>
> Note:
> /tmp/sqoop-cts378874/compile/cbdfc758f7e88cf11f63adf171787630/ONESTAGING.java
> uses or overrides a deprecated API.
>
> Note: Recompile with -Xlint:deprecation for details.
>
> 13/09/23 20:40:58 INFO orm.CompilationManager: Writing jar file:
> /tmp/sqoop-cts378874/compile/cbdfc758f7e88cf11f63adf171787630/ONESTAGING.jar
>
> 13/09/23 20:40:58 INFO mapreduce.ImportJobBase: Beginning import of
> ONESTAGING
>
> 13/09/23 20:40:58 ERROR manager.OracleManager: Failed to rollback
> transaction
>
> java.lang.NullPointerException
>
>         at
> org.apache.sqoop.manager.OracleManager.getColumnNames(OracleManager.java:741)
+
Ramkumar Subramanian 2013-09-27, 07:00
+
Jarek Jarcec Cecho 2013-09-27, 16:05