I am pursuing a bug where when the Network Client receives a Lock Timeout exception in




    public int executeUpdate() throws SQLException {



            synchronized (connection_) {

                if (agent_.loggingEnabled()) {

                    agent_.logWriter_.traceEntry(this, "executeUpdate");


                int updateValue = executeUpdateX();

                if (agent_.loggingEnabled()) {

                    agent_.logWriter_.traceExit(this, "executeUpdate", updateValue);


                return updateValue;



        catch ( SqlException se ) {


            throw se.getSQLException();




I see “se” being the correct exception, but it then goes on to call:




    private String getMessage(int messageNumber) throws SqlException {

        // should this be traced to see if we are calling a stored proc?

        if (cachedMessages != null && cachedMessages[messageNumber] != null) {

            return cachedMessages[messageNumber];



        if (connection_ == null || connection_.isClosedX() || returnTokensOnlyInMessageText_) {

            return getUnformattedMessage(messageNumber);



        CallableStatement cs = null;

        synchronized (connection_) {

            try {

                cs = connection_.prepareMessageProc("call SYSIBM.SQLCAMESSAGE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");


                String errmc = null;

                String sqlState = null;


                if (sqlErrmcMessages_ != null) {

                    errmc = sqlErrmcMessages_[messageNumber];

                    sqlState = sqlStates_[messageNumber];



This code fails with an error indicating that there is no current connection.  It is as if something has closed the connection in between.  I want to enable as much tracing as I can so that maybe I can find this thing.  I am not sure if it is a problem on the server end of the DRDA connection or the client side.


I see tracing in the code but I don’t know how to turn this one.  Just point me where to read about it and I will do the rest.