0

I installed Cloudera QuickStart VM 5.13. I'm using the Sqoop. I tried execute the next command:

[cloudera@quickstart ~]$ sqoop list-tables --connect jdbc:oracle:thin:@localhost:1521:xe --username Guest1 --password G147

Then I have the error:

Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
19/08/23 20:42:38 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.13.0
19/08/23 20:42:38 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
19/08/23 20:42:38 INFO manager.SqlManager: Using default fetchSize of 1000
19/08/23 20:42:39 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.sqoop.manager.OracleManager.listTables(OracleManager.java:769)
        at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:252)

I think The Cloudera doesn't have the OJBDC driver.

What Do I have to do? Where Do I have to install the Oracle OJDBC Driver? Which is It name?

The research:

1. I have put the ojdbc6.jar in next directories:

sudo cp /home/cloudera/Downloads/ojdbc6.jar /var/lib/sqoop/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /var/lib/sqoop2/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /var/lib/oozie/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/share/java/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/share/java/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/share/cmf/common_jars/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/share/cmf/cloudera-scm-telepub/jars/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/lib/sentry/lib/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/lib/hive/lib/ojdbc6.jar
sudo cp /home/cloudera/Downloads/ojdbc6.jar /usr/share/java/ojdbc6.jar

It is same error.

HailToTheVictor
  • 388
  • 2
  • 8
  • 28
  • Not sure if this is an issue, but there is space between `--` and `password` in command. Please try `sqoop list-tables --connect jdbc:oracle:thin:@localhost:1521/xe --username Guest1 --password G147` Can you try this command, Removed `//` from jdbc url too. – SMaZ Aug 29 '19 at 03:23
  • It is the same. – HailToTheVictor Aug 29 '19 at 12:20
  • according to [this](https://community.cloudera.com/t5/Support-Questions/Sqoop-connection-to-Oracle-from-Sandbox-gives-error/m-p/184437), the error happens when connection fails. Ensure you can connect using sqlplus with these credentials, try `--verbose`. The connection string in the question still has the extra `//`, so it's not clear if you tried removing it. – Nickolay Aug 30 '19 at 13:51

1 Answers1

0

Install the JDK 1.7 (or needed) and set system variables (JAVA_HOME, ORACLE_HOME, ORACLE_SID) and copy the jar (/var/lib/sqoop/ojdbc6.jar). For example:

export JAVA_HOME=/usr/java/jdk1.7.0_80/
export ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE/
export ORACLE_SID=XE
HailToTheVictor
  • 388
  • 2
  • 8
  • 28