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.htmlSays 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?
Thanks-
Robert
On Sat, Jul 4, 2009 at 12:04 PM, Knut Anders Hatlen<
Knut.Hatlen@...> wrote:
> "Robert J. Carr" <
rjcarr@...> writes:
>
>> Hi Jeff-
>>
>> It initially happened in 10.3.2.1, but I just updated to 10.5.1.1 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:
>> XID |TYPE |MODE |LOCKCOUNT |LOCKNAME |STATE |TABLENAME
>> ----------------------------------------------------------------
>> *** 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
>