Where can I find information on how to turn on tracing
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
Re: Where can I find information on how to turn on tracing
On Wed, Dec 28, 2011 at 4:08 PM, Bergquist, Brett bbergqu...@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
Re: Where can I find information on how to turn on tracing
On 12/28/2011 4:08 PM, Bergquist, Brett wrote: I am pursuing a bug where when the Network Client receives a Lock Timeout exception in if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, executeUpdate); } 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. Hi Brett, Given DERBY-5553, I think your options would be to 1) Enable tracing on the ClientConnectionPoolDataSource orClientXADataSource with: ds.setConnectionAttributes(traceDirectory=./traceDir); 2) Fix DERBY-5553 and use the system property at http://wiki.apache.org/db-derby/UndocumentedDerbyBehavior