db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: Where can I find information on how to turn on tracing
Date Thu, 29 Dec 2011 00:28:44 GMT
On Wed, Dec 28, 2011 at 4:08 PM, Bergquist, Brett <BBergquist@canoga.com> wrote:
> 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

Hi Brett,

I'm not sure which tracing you refer to, but perhaps this page helps:

http://wiki.apache.org/db-derby/DebugPropertiesTmpl

In case you're not aware of this, to get sane (debug) builds, you have
a couple of mechanisms, such as start your build with -Dsane=true, or
set this property in a file you can create called $HOME/ant.properties
or [top_of_your_tree]/local.properties.

HTH,
Myrna

Mime
View raw message