Closed IamFive closed 8 years ago
The situation is wired, it seems the bug happens in realResultSet.getObject(), but if i remove log4jdbc spy, everything works.
I find out the reason, I have create an [issue|https://github.com/pgjdbc/pgjdbc/issues/540] for postgres-driver project, could check the detail there.
the bug code position for log4jdbc is: net.sf.log4jdbc.sql.resultsetcollector.ResultSetCollectorPrinter#getResultSetToPrint(ResultSetCollector resultSetCollector) at line 80, add a validate before call length()
if (v != null) {
String asStr = v.toString();
if(asStr != null) {
int length = asStr.length();
if (length > maxLength[colIndex]) {
maxLength[colIndex] = length;
}
}
}
issue has been fix in newest version
used driver version is :
used dbpool version
table created sql
After serveral call, ResultSetSpy#getObject(int columnIndex) will return null, i am not sure why, still debug it. if I stop spy the datasource, everything works fine.