Connect to Oracle via sqoop on Hortonworks Sandbox

2.7k views Asked by At

I am currently using Hortonworks Sandbox (downloaded on their website) and I would like to run sqoop to connect to my Oracle database and retrieve information.

The steps I have already done:

  • Install sqoop -> OK
  • Ping my db server -> OK
  • Download Oracle driver ojdbc6.jar -> OK
  • Put Oracle driver ojdbc6.jar in /usr/lib/sqoop/lib -> OK
  • Run sqoop import --connect "jdbc:oracle:thin:readonly/readonly@//unixatd:1521:P1AX" --table DUAL -> OK

I receive the following message:

15/06/16 04:25:01 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.4.2-2
15/06/16 04:25:01 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
15/06/16 04:25:01 INFO manager.SqlManager: Using default fetchSize of 1000
15/06/16 04:25:01 INFO tool.CodeGenTool: Beginning code generation
15/06/16 04:25:01 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.driver.oracledriver
java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.driver.oracledriver
        at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:848)
        at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
        at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:736)
        at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:759)
        at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:269)
        at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:240)
        at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226)
        at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295)
        at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1773)
        at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1578)
        at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601)
        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)

And from there, I just don't know what to do next. If you could give me information on things that I could check, that could be great.

1

There are 1 answers