Lars,
1) Are you using the proper
JDBC driver? Use classes12.zip with 8i.
2) Are you accessing long columns? Are you using resultset.getBytes() method? Have you tried changing the long columns to blobs?
3) Are you getting the resultset out of order?
4) Is the connection getting hosed? Is the application multiple threaded? Are you using connection pooling?
If one of the threads closes the connection and the other one is trying to insert a long value, this error may occur. Also, once you start reading from or writing to a stream, you have to finish it before doing any other operations on that connection.
Try synchronizing the connection object before the 'stream' code.
Regards
Beksy