How do I write a custom Long class to handle long values in Oracle, to avoid the following error?
Caused by: java.sql.SQLException: Stream has already bee
I think you get this message when you try to get an Oracle LONG value from the result set multiple times.
I had code like:
rs.getString(i+1) ;
if (rs.wasNull()) continue ;
set(queryAttr[i], rs.getString(i+1)) ;
And I started getting the "Stream has already been closed." error. I stopped getting the error when I changed the code to:
String str = rs.getString(i+1) ;
if (rs.wasNull()) continue ;
set(queryAttr[i], str) ;