Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-1759

TestIncrementalImport fails with NPE on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.5
    • 1.4.6
    • None
    • None
    • Windows

    Description

      SQOOP-1138 fixes output directory handling in incremental imports in Sqoop and added a few tests. The ORM class file and jar file created used the default name QueryResult and repeated deletion and recreation of the jar file caused NPE when the JarFileLoader was loading the Jar file in one of the tests because of Windows IO related issues with the following stack trace

      java.lang.RuntimeException: java.lang.NullPointerException
      Stacktrace

      java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
      at com.cloudera.sqoop.TestIncrementalImport.runImport(TestIncrementalImport.java:485)
      at com.cloudera.sqoop.TestIncrementalImport.testUpdateModifyWithTimestampWithQuery(TestIncrementalImport.java:1031)
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException
      at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
      at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:45)
      at com.cloudera.sqoop.TestIncrementalImport.runImport(TestIncrementalImport.java:480)
      Caused by: java.lang.NullPointerException
      at java.io.FilterInputStream.close(FilterInputStream.java:181)
      at sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream.close(JarURLConnection.java:108)
      at sun.misc.Resource.getBytes(Resource.java:143)

      The fix is to explicitly specify a unique class name for the ORM class file generated (which is also the jar file name) generated

      Attachments

        1. SQOOP-1759.diff
          0.6 kB
          Venkat Ranganathan

        Activity

          People

            venkatnrangan Venkat Ranganathan
            venkatnrangan Venkat Ranganathan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: