db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bergquist, Brett" <BBergqu...@canoga.com>
Subject Where can I find information on how to turn on tracing
Date Thu, 29 Dec 2011 00:08:14 GMT
I am pursuing a bug where when the Network Client receives a Lock Timeout exception in

PreparedStatement.java:

    public int executeUpdate() throws SQLException {
        try
        {
            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 ) {
            checkStatementValidity(se);
            throw se.getSQLException();
        }
    }

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

Sqlca.java:

    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.

Thanks.

Brett

Mime
View raw message