Reputation: 1
When I try to import data from Oracle to HDFS using the below syntax:
./sqoop import --connect jdbc:oracle:thin://@XX.XX.XX.XX:1521:orcl --username orcluser -P --table TABLE --target-dir /datadir -m 1
then I got:
18/12/04 16:24:26 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
18/12/04 16:24:26 INFO manager.SqlManager: Using default fetchSize of 1000
18/12/04 16:24:27 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:76)
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've checked the Firewall and the ojdbc8.jar Oracle connector in the Sqoop lib folder. PING IPADRESS also works well. Thanks to anyone who can help me solve the problem. I've tried anything I can do while nothing good happened.
Upvotes: 0
Views: 1661
Reputation: 1912
The error that you are getting indicates that the Connection is not established with the Oracle Database. Mostly likely it it due to either the Database hostname is not resolvable from your machine where you are running the sqoop client Or the --connect URL is not in correct format. Please remove the '//' from the connection url string.
./sqoop import --connect jdbc:oracle:thin:@XX.XX.XX.XX:1521:orcl --username orcluser -P --table TABLE --target-dir /datadir -m 1
Upvotes: 1