Bug in org.webdocwf.util.xml.XmlResultSet.java
Patch to fix:
---
Octopus/Octopus-src/modules/XMLjdbc/src/src/org/webdocwf/util/xml/XmlResultSet.java
2006-06-23 04:40:52.000000000 -0600
+++
XMLjdbc/src/src/org/webdocwf/util/xml/XmlResultSet.java 2007-06-19
09:40:18.797775400 -0600
@@ -127,6 +127,7
@@
public String getString(int i) throws SQLException {
try {
+ lastIndexRead =
i;
return
this.columnValues[i-1].toString();
}catch(Exception
e) { throw new SQLException("Error ResultSet.getString( in
dex ) :
"+e.getMessage()); }
}
@@ -450,6 +451,7 @@
}
if( colIndex == -1 )
throw new
SQLException("Column "+columnName+" not found.");
+ lastIndexRead =
colIndex;
return
this.columnValues[colIndex];
}
The code in
org.webdocwf.util.xml.XmlResultSet.java:wasNull() looks for lastIndexRead
>=0. lastIndexRead is initialized to -1. However, it is never
incremented in any of the getters, so code like this:
while (rs.next()) {
String s = rs.getString();
if (rs.wasNull()) {
}
}
Always throws an exception with "No previous getter
method called".
--
You receive this message as a subscriber of the
octopus@... mailing list.
To unsubscribe: mailto:
octopus-unsubscribe@...
For general help: mailto:
sympa@...?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws