java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : TABLE, PROCESS_055234_HR, Tablelock Waiting XID : {104215, IS} , APP, SELECT CpuNum, SampleTimestamp AS TimeStamp, ProcBusyPercent AS BusyPercent FROM PROCESS_055234_HR WHERE SampleTimestamp >= ? AND Volume=? AND Subvol=? AND Filename=? AND ProcessName=? AND CpuNum=? AND PIN=? ORDER BY SampleTimestamp Granted XID : {102377, X} Lock : ROW, SYSCONGLOMERATES, (7,9) Waiting XID : {102377, X} , APP, alter table "APP"."PROCESS_055234_HR" compress sequential Granted XID : {102377, S} , {104215, S} . The selected victim is XID : 104215.

Apache's JIRA Issue Tracker | Varma R | 6 years ago
  1. 0

    One of the derby database table "gets corrupted"/"indicates connection not available" during processing inserts from java client application as shown in the trace and the only way to recover from this error is to rebuild the DB - by deleting the data and creating the tables again. This happens once in a while (thrice in a span of two months) and the java application (run in multiple servers), which updates the database, processes around 100 million transactions per hour (in total and each transation results in 4-5 updates to the DB) There are eight tables in the derby database. TABLE NAME ROWS COUNT (at time of corruption) --------------------------------------------------------------------------------- KPI.KPI_MERGEIN; 362917 KPI.KPI_IN; 422508 KPI.KPI_DROPPED; 53667 KPI.KPI_ERROR1; 0 KPI.KPI_ERROR2; 2686 KPI.KPI_ERRORMERGE; 0 KPI.KPI_MERGEOUT; 362669 KPI.KPI_OUT; 125873 The derby database has been started with the following parameters CMD="java -Dderby.system.home=$DERBY_OPTS -Dderby.locks.monitor=true -Dderby.locks.deadlockTrace=true -Dderby.locks.escalationThreshold=50000 -Dderby.locks.waitTimeout= -1 -Dderby.storage.pageCacheSize=100000 -Xms512M -Xmx3072M -XX:NewSize=256M -classpath $DERBY_CLASSPATH org.apache.derby.drda.NetworkServerControl start -h $KPIDERBYHOST -p $DERBY_KPI_PORT" The corrupted database tar (filesystem) in live environment was moved to a test system (Solaris system) and few checks were run on the corrupted DB as part of analysis (DB does start fine) While trying to insert a row in any table expect KPI.KPI_MERGEIN, it is successful. But when a new row is inserted into KPI.KPI_MERGEIN table using command line tool it's throwing below error message (the same message that appeared in live ij> INSERT INTO KPI.KPI_MERGEIN (A0_TXN_ID, A1_NE_ID, A2_CHU_IP_ADDR, A3_BATCH_DATE,A5_CODE) VALUES (-1, 'BMTDE', '192.2.1.3', 231456879, 'KSD'); ERROR 08006: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message and in derby.log file it shows below error stacktrace. ERROR XSDG0: Page Page(51919,Container(0, 1104)) could not be read from disk. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.readPage(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.initPage(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.newPage(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainer.addPage(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainerHandle.addPage(Unknown Source) at org.apache.derby.impl.store.access.heap.HeapController.doInsert(Unknown Source) at org.apache.derby.impl.store.access.heap.HeapController.insertAndFetchLocation(Unknown Source) at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLIMM(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) Caused by: java.io.EOFException: Reached end of file while attempting to read a whole page. at org.apache.derby.impl.store.raw.data.RAFContainer4.readFull(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage0(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(Unknown Source) ... 20 more ============= begin nested exception, level (1) =========== java.io.EOFException: Reached end of file while attempting to read a whole page. at org.apache.derby.impl.store.raw.data.RAFContainer4.readFull(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage0(Unknown Source) at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.readPage(Unknown Source) at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.initPage(Unknown Source) at org.apache.derby.impl.store.raw.data.FileContainer.newPage(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainer.addPage(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainerHandle.addPage(Unknown Source) at org.apache.derby.impl.store.access.heap.HeapController.doInsert(Unknown Source) at org.apache.derby.impl.store.access.heap.HeapController.insertAndFetchLocation(Unknown Source) at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLIMM(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) ============= end nested exception, level (1) =========== 2011-05-16 10:37:21.392 GMT: Shutting down instance a816c00e-012f-f85f-7892-ffff874c3ff6 ---------------------------------------------------------------- Cleanup action completed The problem is only with INSERT statement. When i try SELECT statement on KPI.KPI_MERGEIN table it is working well.The database file system size (in seg0) is 1.3 GB Can anyone help me out in identifying the problem that why for one table alone its throwing the above error message ? Would upgrade to a new version help ?

    Apache's JIRA Issue Tracker | 6 years ago | Varma R
    java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : TABLE, PROCESS_055234_HR, Tablelock Waiting XID : {104215, IS} , APP, SELECT CpuNum, SampleTimestamp AS TimeStamp, ProcBusyPercent AS BusyPercent FROM PROCESS_055234_HR WHERE SampleTimestamp >= ? AND Volume=? AND Subvol=? AND Filename=? AND ProcessName=? AND CpuNum=? AND PIN=? ORDER BY SampleTimestamp Granted XID : {102377, X} Lock : ROW, SYSCONGLOMERATES, (7,9) Waiting XID : {102377, X} , APP, alter table "APP"."PROCESS_055234_HR" compress sequential Granted XID : {102377, S} , {104215, S} . The selected victim is XID : 104215.
  2. 0

    [2009-05-19 16:01:22,633] ERROR (com.webreach.mirth.server.controllers.DefaultMessageObjectController:205): could not log message: id=245eef0f-445a-473c-a496-5d164c21047a com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in derby/derby-message.xml. --- The error occurred while executing update. --- Check the INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) . --- Check the SQL Statement (preparation failed). --- Cause: java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294. Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294. at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82) at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.writeMessageToDatabase(DefaultMessageObjectController.java:202) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.updateMessage(DefaultMessageObjectController.java:177) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.setStatus(DefaultMessageObjectController.java:725) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.setSuccess(DefaultMessageObjectController.java:657) at com.webreach.mirth.connectors.file.FileMessageDispatcher.doDispatch(FileMessageDispatcher.java:109) at com.webreach.mirth.connectors.file.FileMessageDispatcher.doSend(FileMessageDispatcher.java:144) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:167) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85) at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:52) at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48) at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82) at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247) at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209) at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201) at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:180) at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:147) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:244) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processHL7Data(MllpMessageReceiver.java:476) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processData(MllpMessageReceiver.java:436) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.run(MllpMessageReceiver.java:353) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Unknown Source)Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958) at $Proxy6.prepareStatement(Unknown Source) at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:494) at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:76) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78) ... 33 moreCaused by: java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 55 more Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958) at $Proxy6.prepareStatement(Unknown Source) at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:494) at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:76) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82) at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.writeMessageToDatabase(DefaultMessageObjectController.java:202) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.updateMessage(DefaultMessageObjectController.java:177) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.setStatus(DefaultMessageObjectController.java:725) at com.webreach.mirth.server.controllers.DefaultMessageObjectController.setSuccess(DefaultMessageObjectController.java:657) at com.webreach.mirth.connectors.file.FileMessageDispatcher.doDispatch(FileMessageDispatcher.java:109) at com.webreach.mirth.connectors.file.FileMessageDispatcher.doSend(FileMessageDispatcher.java:144) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:167) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85) at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:52) at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48) at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82) at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247) at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209) at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201) at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:180) at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:147) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:244) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processHL7Data(MllpMessageReceiver.java:476) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processData(MllpMessageReceiver.java:436) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.run(MllpMessageReceiver.java:353) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Unknown Source)Caused by: java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 55 more

    Mirth Project | 8 years ago | joe tilley
    java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, SYSCONGLOMERATES, (5,15) Waiting XID : {153691294, S} , APP, INSERT INTO MESSAGE (ID, SERVER_ID, CHANNEL_ID, SOURCE, TYPE, DATE_CREATED, VERSION, IS_ENCRYPTED, STATUS, RAW_DATA, RAW_DATA_PROTOCOL, TRANSFORMED_DATA, TRANSFORMED_DATA_PROTOCOL, ENCODED_DATA, ENCODED_DATA_PROTOCOL, CONNECTOR_NAME, ERRORS, CORRELATION_ID, CONNECTOR_MAP, CHANNEL_MAP, RESPONSE_MAP, ATTACHMENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Granted XID : {153627442, S} Lock : ROW, SYSCONGLOMERATES, (5,14) Waiting XID : {153627442, X} , APP, alter table "APP"."MESSAGE" compress Granted XID : {153627442, S} , {153691294, S} . The selected victim is XID : 153691294.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Getting transaction deadlocks while deploying product catalog

    Oracle Community | 5 years ago | 884994
    java.sql.SQLTransactionRollbackException: [DEV-SQL-ECOM01]Transaction (Process ID 250) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Msg 1205, Level 13, State 45, Line 1, Sqlstate 40000
  5. 0

    Eclipselink OptimisticLock causing deadlocks

    Stack Overflow | 2 years ago | user3491141
    java.sql.SQLTransactionRollbackException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 338) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Error Code: 1205 Call: SELECT CAL_ID_NR, CAL_CNX_B, REC_STS_CD, REC_SEQ_NR, SRC_DAT_CTR_NR, REC_UDT_TS, REC_TYP_VER_NR FROM TCALCNX WHERE (CAL_ID_NR = ?) bind =&gt; [P4F22420140806182408001244] Query: ReadObjectQuery(name="readObject" referenceClass=CallContentEntity sql="SELECT CAL_ID_NR, CAL_CNX_B, REC_STS_CD, REC_SEQ_NR, SRC_DAT_CTR_NR, REC_UDT_TS, REC_TYP_VER_NR FROM TCALCNX WHERE (CAL_ID_NR = ?)")

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLTransactionRollbackException

      A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : TABLE, PROCESS_055234_HR, Tablelock Waiting XID : {104215, IS} , APP, SELECT CpuNum, SampleTimestamp AS TimeStamp, ProcBusyPercent AS BusyPercent FROM PROCESS_055234_HR WHERE SampleTimestamp >= ? AND Volume=? AND Subvol=? AND Filename=? AND ProcessName=? AND CpuNum=? AND PIN=? ORDER BY SampleTimestamp Granted XID : {102377, X} Lock : ROW, SYSCONGLOMERATES, (7,9) Waiting XID : {102377, X} , APP, alter table "APP"."PROCESS_055234_HR" compress sequential Granted XID : {102377, S} , {104215, S} . The selected victim is XID : 104215.

      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException()
    2. Derby
      EmbedConnection.prepareStatement
      1. org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:89)
      2. org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256)
      3. org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:424)
      4. org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
      5. org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2290)
      6. org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
      7. org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:151)
      8. org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java:82)
      9. org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java:63)
      10. org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(EmbedPreparedStatement40.java:40)
      11. org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:107)
      12. org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1615)
      13. org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1443)
      13 frames
    3. com.idelji.operations
      ProcessDAO.getLastRecordFromIntervalTableShowGap
      1. com.idelji.operations.iasset.plugin.imon.dao.ProcessDAO.getLastRecordFromIntervalTableShowGap(ProcessDAO.java:503)
      1 frame
    4. imon.utils
      DataSourceRouter.getLatestProcessData
      1. imon.utils.DataSourceRouter.getLatestProcessData(DataSourceRouter.java:608)
      1 frame
    5. imon.db
      ProcessDataProvider.getLatestData
      1. imon.db.ProcessDataProvider.getLatestData(ProcessDataProvider.java:131)
      1 frame
    6. imon.charts
      LineChartWithSlider$1.handle
      1. imon.charts.LineChartWithSlider.refreshChartData(LineChartWithSlider.java:558)
      2. imon.charts.LineChartWithSlider$1.handle(LineChartWithSlider.java:327)
      3. imon.charts.LineChartWithSlider$1.handle(LineChartWithSlider.java:322)
      3 frames
    7. com.sun.scenario
      TimelineClipCore.playTo
      1. com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:196)
      2. com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:137)
      2 frames
    8. javafx.animation
      Timeline.impl_playTo
      1. javafx.animation.Timeline.impl_playTo(Timeline.java:163)
      1 frame
    9. com.sun.scenario
      InfiniteClipEnvelope.timePulse
      1. com.sun.scenario.animation.shared.InfiniteClipEnvelope.timePulse(InfiniteClipEnvelope.java:89)
      1 frame
    10. javafx.animation
      Animation.impl_timePulse
      1. javafx.animation.Animation.impl_timePulse(Animation.java:952)
      1 frame
    11. com.sun.scenario
      AnimationPulseReceiver.timePulse
      1. com.sun.scenario.animation.shared.AnimationPulseReceiver.timePulse(AnimationPulseReceiver.java:75)
      1 frame
    12. Java Swing/2D Scene Graph
      AbstractMasterTimer$MainLoop.run
      1. com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)
      2. com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:280)
      2 frames
    13. com.sun.javafx
      QuantumToolkit$8.run
      1. com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:381)
      2. com.sun.javafx.tk.quantum.QuantumToolkit$8.run(QuantumToolkit.java:311)
      2 frames
    14. com.sun.glass
      WinApplication$2$1.run
      1. com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      2. com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      3. com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
      3 frames
    15. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame