Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-1219

LP Bug: 1450349 - NullPointerException when close a ResultSet of getColumns()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-incubating
    • Component/s: client-jdbc-t2
    • Labels:
      None

      Description

      When I close the ResultSet of GetColumns(), it will throw a NullPointerException. Here is the java code.

      DatabaseMetaData dbmd = conn.getMetaData();
      ResultSet res = dbmd.getColumns(null, null, "QATABU", null);
      ResultSetMetaData rsMd = res.getMetaData();
      System.out.println("");
      System.out.println("No. of Columns " + rsMd.getColumnCount());
      for (int j = 1; j <= rsMd.getColumnCount(); j++)

      { System.out.println("Column " + j + " DataType: " + rsMd.getColumnTypeName(j) + "Name: " + rsMd.getColumnName(j)); }

      res.close();
      conn.close();

        Attachments

          Activity

            People

            • Assignee:
              weiqxu Weiqing Xu
              Reporter:
              weiqxu Weiqing Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: