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: Debugging lock timeouts - versuchen01X
Date Tue, 02 Mar 2010 21:16:17 GMT
Gabriele Kahlout <gabriele@mysimpatico.com> writes:

> java.sql.SQLException: The exception 'java.sql.SQLException: A lock
> could not be obtained within the time requested.  The lockTable dump
> is:

Hi Gabriele,

Just a guess, but could it be that the stored procedure you call from
the trigger obtains a new connection to your Derby database instead of
running within the current connection? That could result in lock issues
like the ones you're seeing.

Is this the code that's failing?
http://code.google.com/p/memorizeasy/source/browse/trunk/MemorizEasy/src/com/mysimpatico/memorizeasy/engine/Database.java?r=113#162

If so, you may want to try to replace the following lines in
refExpTablesComp():

Connection con = null;  
    try{con = getConnection();}catch (Exception e){;}

with

Connection con = DriverManager.getConnection("jdbc:default:connection");

and see if that makes it work.

-- 
Knut Anders

Mime
View raw message