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

Switch to Threaded View
Sqoop >> mail # user >> Problem with Oracle JDBC driver and Sqoop compatibility


Copy link to this message
-
Re: Problem with Oracle JDBC driver and Sqoop compatibility
Thank you for getting back to us and sharing what has helped in your case, I'm sure that this will be helpful for others as well!

Jarcec

On Fri, Sep 27, 2013 at 12:30:39PM +0530, Ramkumar Subramanian wrote:
> Jarcec,
>
> Thanks for your reply. The Issue is resolved now.
>
> When I tried using ojdbc6.jar of oracle 12c, I was not able to connect.
> However, read from another user experience that Sqoop 1.4.3 is able to
> connect to oracle 12c only with the ojdbc6.jar jdbc driver of oracle
> version 11.2.0.3.
>
> Tried with this JDBC driver and I was able to connect.
>
> Thanks & Regards,
> Ramkumar Subramanian.
>
>
> On Thu, Sep 26, 2013 at 9:14 PM, Jarek Jarcec Cecho <[EMAIL PROTECTED]>wrote:
>
> > 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