The exception which was received is com.ibm.websphere.ce.cm.StaleConnectionException: [ibm][db2][jcc][t4] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
The command requested could not be completed because of a permanent error condition detected at the target system.
This error occurs when i use the overloaded prepareStatement method
However, when use the below statement, the application works fine.
I use Type 4 jcc driver to connect to DB2.
Do you really need a scrollable query?
This query is part of an application that was working fine in DB2 V8 - the exception began to surface only after we migrated to DB2 V9. We have used the new set of drivers (3 of them).
But still, I wouldn't expect that sort of error message to appear for non-scrollable queries.
Thats true - may be this is something to do with the driver and not much about connectivity as such. Since some of the other queries work fine.