db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: locking problem
Date Fri, 17 Jul 2009 10:09:29 GMT
"Robert J. Carr" <rjcarr@gmail.com> writes:

> Hi Knut-
>
> I've returned from a short holiday and hoping you could help me out a
> bit more.  I think the flag you suggested is what I'm looking for, but
> I don't know where to track down the logs.  I create my database using
> ant and then later use it in tomcat.  When I create the database a
> 'derby.log' file is written into the same folder as my build.xml.
> Here are the contents of that file:
>
> ----
>
> 2009-07-08 23:30:54.701 GMT:
>  Booting Derby version The Apache Software Foundation - Apache Derby -
> 10.5.1.1 - (764942): instance a816c00e-0122-5cb4-9604-0000000f49d8
> on database directory /Users/rjcarr/...
>
> Database Class Loader started - derby.database.classpath=''
>
> ----
>
> However, after it is created, nothing is added to it.  So I'm not sure
> where to look to find these logs.  This link:
>
> http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.cloudscape.doc/rtunproper43517.html
>
> Says it is written to the "information log", but I don't know what that is.
>
> When I added this flag:
>
> derby.locks.deadlockTrace=true
>
> The logTable dump (which I've posted earlier) is embedded into the
> stack trace.  Looking at the stack trace after adding the flag you've
> suggested I don't see anything different.
>
> So, long story short, where do I find these log entries?

Hi Robert,

Sorry for the late reply.

derby.log is where you should find these entries. How did you set the
property? One difference between derby.locks.deadlockTrace and
derby.language.logStatementText is that the former is dynamic and the
latter is static, meaning that if you set d.l.logStatementText with
SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY, it won't take effect until you
have rebooted the database.

Does it work if you create a file called "derby.properties" in the same
directory as where you found derby.log and add the lines below to it?

derby.language.logStatementText=true
derby.locks.deadlockTrace=true

Then, after creating/using the database, derby.log should contain
entries similar to this one for each statement you have executed:

2009-07-17 10:05:26.608 GMT Thread[main,5,main] (XID = 144), (SESSIONID = 0), (DATABASE =
db), (DRDAID = null), Begin compiling prepared statement: create table t(x int) :End prepared
statement
2009-07-17 10:05:26.703 GMT Thread[main,5,main] (XID = 144), (SESSIONID = 0), (DATABASE =
db), (DRDAID = null), End compiling prepared statement: create table t(x int) :End prepared
statement
2009-07-17 10:05:26.716 GMT Thread[main,5,main] (XID = 144), (SESSIONID = 0), (DATABASE =
db), (DRDAID = null), Executing prepared statement: create table t(x int) :End prepared statement

-- 
Knut Anders

Mime
View raw message