It generally means you're either doing something to cause a deadlock between 
two transactions or otherwise one transaction is being forced to wait too long 
for another transaction's lock to be released.
If you're not sure what is causing the problem then you can uncomment the 
debugging lines in derby.properties to see in the logs which thread/transaction 
is blocking and which is left waiting.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 4/08/2010, at 11:42 PM, Chatree Srichart wrote:

> I try to insert data to data base about 200 records. But I got some error
> message look like database lock problem.
> 
> This is the exception:
> 
> ---- exception report
> ----------------------------------------------------------
> Failure in findOne operation for entity [Product]:
> org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing
> the following:
> ...
> ...
> ...
> --- cause
> ---------------------------------------------------------------------
> Exception: org.apache.derby.iapi.error.StandardException
> Message: A lock could not be obtained within the time requested
> ---- stack trace
> ---------------------------------------------------------------
> ERROR 40XL1: A lock could not be obtained within the time requested
> org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown
> Source)
> org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown Source)
> org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown
> Source)
> org.apache.derby.impl.store.raw.xact.RowLocking2.lockRecordForRead(Unknown
> Source)
> org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown
> Source)
> org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown
> Source)
> org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(Unknown
> Source)
> org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(Unknown
> Source)
> 
> Can any one help me what I have to do for fix this?
> 
> Regards,
> Chatree Srichart

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to