Hive
  1. Hive
  2. HIVE-2069

NullPointerException on getSchemas

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: JDBC
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Fix for NullPointerException on the jdbc driver on getSchemas

      Description

      Calling getSchemas will cause a nullpointerexception

        Issue Links

          Activity

          Hide
          Bennie Schut added a comment -

          java.lang.NullPointerException
          at java.util.ArrayList.<init>(ArrayList.java:131)
          at org.apache.hadoop.hive.jdbc.HiveMetaDataResultSet.<init>(HiveMetaDataResultSet.java:32)
          at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$3.<init>(HiveDatabaseMetaData.java:481)
          at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getSchemas(HiveDatabaseMetaData.java:480)
          at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getSchemas(HiveDatabaseMetaData.java:475)
          at org.apache.hadoop.hive.jdbc.TestJdbcDriver.testMetaDataGetSchemas(TestJdbcDriver.java:488)

          Probably introduced on HIVE-1126. getCatalogs works correctly but this wasn't tested.

          Show
          Bennie Schut added a comment - java.lang.NullPointerException at java.util.ArrayList.<init>(ArrayList.java:131) at org.apache.hadoop.hive.jdbc.HiveMetaDataResultSet.<init>(HiveMetaDataResultSet.java:32) at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$3.<init>(HiveDatabaseMetaData.java:481) at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getSchemas(HiveDatabaseMetaData.java:480) at org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData.getSchemas(HiveDatabaseMetaData.java:475) at org.apache.hadoop.hive.jdbc.TestJdbcDriver.testMetaDataGetSchemas(TestJdbcDriver.java:488) Probably introduced on HIVE-1126 . getCatalogs works correctly but this wasn't tested.
          Hide
          Bennie Schut added a comment -

          This patch includes a fix and a test which can be used to reproduce the nullpointer.

          Show
          Bennie Schut added a comment - This patch includes a fix and a test which can be used to reproduce the nullpointer.
          Hide
          Ning Zhang added a comment -

          +1. will commit if tests pass.

          Show
          Ning Zhang added a comment - +1. will commit if tests pass.
          Hide
          Ning Zhang added a comment -

          Committed. Thanks Bennie!

          Show
          Ning Zhang added a comment - Committed. Thanks Bennie!

            People

            • Assignee:
              Bennie Schut
              Reporter:
              Bennie Schut
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development