Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-1373

Sqoop import schema is locked shows NullPointerException

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4.4
    • Fix Version/s: 1.4.5
    • Labels:
      None
    • Environment:

      This was seen on Sqoop which came with CDH5.0.2.

      Description

      The target Oracle database was locked and we were trying to do import-all-tables and import table from that database. We get a NullPointerException instead of 'database is locked'.

      > sqoop import-all-tables  --connect jdbc:oracle:thin:@cor:1521/database name --username xxxxx -P --verbose  -m 1
      
      Warning: /opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
      Please set $ACCUMULO_HOME to the root of your Accumulo installation.
      14/07/10 12:47:03 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.0.2
      14/07/10 12:47:03 DEBUG tool.BaseSqoopTool: Enabled debug logging.
      Enter password:
      14/07/10 12:47:07 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
      14/07/10 12:47:07 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
      14/07/10 12:47:07 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:oracle:thin:@cor
      14/07/10 12:47:07 DEBUG manager.OracleManager$ConnCache: Instantiated new connection cache.
      14/07/10 12:47:07 INFO manager.SqlManager: Using default fetchSize of 1000
      14/07/10 12:47:07 DEBUG sqoop.ConnFactory: Instantiated ConnManager org.apache.sqoop.manager.OracleManager@5560c7a8
      14/07/10 12:47:07 DEBUG manager.OracleManager: Creating a new connection for jdbc:oracle:thin:@cor:1521/pitaqa.accidentfund.com, using username: underwriting
      14/07/10 12:47:07 DEBUG manager.OracleManager: No connection paramenters specified. Using regular API for making connection.
      14/07/10 12:47:08 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
      java.lang.NullPointerException
              at org.apache.sqoop.manager.OracleManager.listTables(OracleManager.java:751)
              at org.apache.sqoop.tool.ImportAllTablesTool.run(ImportAllTablesTool.java:95)
              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:222)
              at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
              at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
      

        Activity

        Hide
        gwenshap Gwen Shapira added a comment -

        Does not reproduce. Attempt to import locked schema shows proper error. I suspect the cause is different:

        14/07/29 09:02:57 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.1.0
        14/07/29 09:02:57 DEBUG tool.BaseSqoopTool: Enabled debug logging.
        14/07/29 09:02:57 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
        14/07/29 09:02:57 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
        14/07/29 09:02:57 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
        14/07/29 09:02:57 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:oracle:thin:@
        14/07/29 09:02:57 DEBUG manager.OracleManager$ConnCache: Instantiated new connection cache.
        14/07/29 09:02:57 INFO manager.SqlManager: Using default fetchSize of 1000
        14/07/29 09:02:57 DEBUG sqoop.ConnFactory: Instantiated ConnManager org.apache.sqoop.manager.OracleManager@134a99dc
        14/07/29 09:02:57 INFO tool.CodeGenTool: Beginning code generation
        14/07/29 09:02:58 DEBUG manager.OracleManager: Using column names query: SELECT t.* FROM FOO t WHERE 1=0
        14/07/29 09:02:58 DEBUG manager.SqlManager: Execute getColumnTypesRawQuery : SELECT t.* FROM FOO t WHERE 1=0
        14/07/29 09:02:58 DEBUG manager.OracleManager: Creating a new connection for jdbc:oracle:thin:@//oracle.ent.cloudera.com, using username: gwenshap
        14/07/29 09:02:58 DEBUG manager.OracleManager: No connection paramenters specified. Using regular API for making connection.
        14/07/29 09:02:58 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: ORA-28000: the account is locked
        
        java.sql.SQLException: ORA-28000: the account is locked
        
        
        Show
        gwenshap Gwen Shapira added a comment - Does not reproduce. Attempt to import locked schema shows proper error. I suspect the cause is different: 14/07/29 09:02:57 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.1.0 14/07/29 09:02:57 DEBUG tool.BaseSqoopTool: Enabled debug logging. 14/07/29 09:02:57 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 14/07/29 09:02:57 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory 14/07/29 09:02:57 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory 14/07/29 09:02:57 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:oracle:thin:@ 14/07/29 09:02:57 DEBUG manager.OracleManager$ConnCache: Instantiated new connection cache. 14/07/29 09:02:57 INFO manager.SqlManager: Using default fetchSize of 1000 14/07/29 09:02:57 DEBUG sqoop.ConnFactory: Instantiated ConnManager org.apache.sqoop.manager.OracleManager@134a99dc 14/07/29 09:02:57 INFO tool.CodeGenTool: Beginning code generation 14/07/29 09:02:58 DEBUG manager.OracleManager: Using column names query: SELECT t.* FROM FOO t WHERE 1=0 14/07/29 09:02:58 DEBUG manager.SqlManager: Execute getColumnTypesRawQuery : SELECT t.* FROM FOO t WHERE 1=0 14/07/29 09:02:58 DEBUG manager.OracleManager: Creating a new connection for jdbc:oracle:thin:@ //oracle.ent.cloudera.com, using username: gwenshap 14/07/29 09:02:58 DEBUG manager.OracleManager: No connection paramenters specified. Using regular API for making connection. 14/07/29 09:02:58 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: ORA-28000: the account is locked java.sql.SQLException: ORA-28000: the account is locked

          People

          • Assignee:
            gwenshap Gwen Shapira
            Reporter:
            ranjana_rajendran Ranjana Rajendran
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development