db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert J. Carr" <rjc...@gmail.com>
Subject Re: locking problem
Date Wed, 08 Jul 2009 23:54:20 GMT
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 - - (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:


Says it is written to the "information log", but I don't know what that is.

When I added this flag:


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?


On Sat, Jul 4, 2009 at 12:04 PM, Knut Anders Hatlen<Knut.Hatlen@sun.com> wrote:
> "Robert J. Carr" <rjcarr@gmail.com> writes:
>> Hi Jeff-
>> It initially happened in, but I just updated to and
>> the same problem exists.
>> And I may have mentioned in the original post it was a table lock, and
>> I don't know if I misread it initially or if something changed when I
>> updated derby, but it seems to be a row lock.  Here's a condensed
>> version of the lock trace:
>> java.sql.SQLException: A lock could not be obtained within the time
>> requested.  The lockTable dump is:
>> ----------------------------------------------------------------
>> *** The following row is the victim ***
>> 5222      |ROW    |X    |0         |(2,38)     |WAIT  |SG_TRACKS
>> *** The above row is the victim ***
>> 5104      |ROW    |S    |1         |(2,38)     |GRANT |SG_TRACKS
>> 5104      |TABLE  |IS   |1         |Tablelock  |GRANT |SG_TRACKS
>> 5222      |TABLE  |IX   |2         |Tablelock  |GRANT |SG_TRACKS
>> ----------------------------------------------------------------
> If you run with derby.language.logStatementText=true you'll be able to
> find in derby.log which statements a transaction with a particular XID
> has executed. This may help you track down the runaway transaction
> that's holding onto the shared row lock.
> --
> Knut Anders

View raw message