NullPointerException when close a ResultSet of getColumns()

Bug #1450349 reported by Weiqing Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
Medium
Weiqing Xu

Bug 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();

Weiqing Xu (wei-qing-xu)
Changed in trafodion:
assignee: nobody → Weiqing Xu (wei-qing-xu)
Changed in trafodion:
milestone: none → r2.0
importance: Undecided → Medium
Weiqing Xu (wei-qing-xu)
summary: - NullPointerException when close a ResultSet of getColumnCount()
+ NullPointerException when close a ResultSet of getColumns()
Weiqing Xu (wei-qing-xu)
Changed in trafodion:
status: New → In Progress
Weiqing Xu (wei-qing-xu)
Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.