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)
      

        Attachments

          Activity

            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: