Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

LIST TABLES issue,Issue with LIST TABLES

Highlighted

LIST TABLES issue,Issue with LIST TABLES

New Contributor

[root@sandbox ~]# sqoop list-tables --connect jdbc:oracle:thin:@//url:1241/service1/db110 --username usr10 -

-password ******                                                                                                                                   
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.                                                                  
Please set $ACCUMULO_HOME to the root of your Accumulo installation.                                                                                 
17/02/28 14:32:44 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.5.0.0-1245                                                                        
17/02/28 14:32:44 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.                         
17/02/28 14:32:45 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.                                                
17/02/28 14:32:45 INFO manager.SqlManager: Using default fetchSize of 1000                                                                           
17/02/28 14:33:08 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException                                                     
java.lang.NullPointerException                                                                                                                       
        at org.apache.sqoop.manager.OracleManager.listTables(OracleManager.java:760)                                                                 
        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:225)                                                                                            
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)                                                                                            
        at org.apache.sqoop.Sqoop.main(Sqoop.java:243)                                                                                               
[root@sandbox ~]#                                                                                                                                    
,

[root@sandbox ~]# sqoop list-tables --connect jdbc:oracle:thin:@//host:1241/service/db --username usr1 -

-password *******                                                                                                                                   
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.                                                                  
Please set $ACCUMULO_HOME to the root of your Accumulo installation.                                                                                 
17/02/28 14:32:44 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.5.0.0-1245                                                                        
17/02/28 14:32:44 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.                         
17/02/28 14:32:45 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.                                                
17/02/28 14:32:45 INFO manager.SqlManager: Using default fetchSize of 1000                                                                           
17/02/28 14:33:08 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException                                                     
java.lang.NullPointerException                                                                                                                       
        at org.apache.sqoop.manager.OracleManager.listTables(OracleManager.java:760)                                                                 
        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:225)                                                                                            
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)                                                                                            
        at org.apache.sqoop.Sqoop.main(Sqoop.java:243)                                                                                               
[root@sandbox ~]#                                                                                                                                    
2 REPLIES 2

Re: LIST TABLES issue,Issue with LIST TABLES

Rising Star

@Jawad Shaik pls check the connection string

It should be like

--connect jdbc:oracle:thin@<host>:<port>/<db_name>

eg: --connect jdbc:oracle:thin@10.10.10.10:1521/orcl

If Oracle driver could not be located try also using --driver oracle.jdbc.driver.OracleDriver

Highlighted

Re: LIST TABLES issue,Issue with LIST TABLES

Super Mentor

@Jawad Shaik

The error that you are getting indicates that the Connection is not established with the Oracle Database.

Mostly either the Database hostname is not resolvable from your machine where you are running the sqoop client.

You can try doing a telnet to see if you can reach to the database. (jdbc:oracle:thin:@host:1241/Servicename)

telnet  host  1241

.

Check if you are able to connect to that host & port? If not then try specifying the IP Address instead and then try again.

Example:

sqoop list-tables --connect jdbc:oracle:thin:@host:1241/service/db --username usr1 -password yourpwd
Don't have an account?
Coming from Hortonworks? Activate your account here