java.sql.SQLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When doing a JIRA upgrade, UpgradeTask_Build70108 can cause a deadlock and JIRA to fail. Stacktrace might resemble something like this {code} c.a.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. com.atlassian.jira.exception.DataAccessException: java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at com.atlassian.jira.upgrade.util.UpgradeUtils.doColumnsOrTablesExist(UpgradeUtils.java:316) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build70108.doUpgrade(UpgradeTask_Build70108.java:63) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSuccess(UpgradeManagerImpl.java:698) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:589) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:473) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:415) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:359) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.upgradeJira(DefaultDataImportService.java:825) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:731) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:312) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) at net.sourceforge.jtds.jdbc.TdsCore.isDataInResultSet(TdsCore.java:838) at net.sourceforge.jtds.jdbc.JtdsResultSet.<init>(JtdsResultSet.java:149) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1032) at net.sourceforge.jtds.jdbc.JtdsDatabaseMetaData.getColumns(JtdsDatabaseMetaData.java:422) at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218) at com.atlassian.jira.upgrade.util.UpgradeUtils.doColumnsOrTablesExist(UpgradeUtils.java:297) ... 19 more {code}
    via by Emiliano Sala [Atlassian],
  • When doing a JIRA upgrade, UpgradeTask_Build70108 can cause a deadlock and JIRA to fail. Stacktrace might resemble something like this {code} c.a.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. com.atlassian.jira.exception.DataAccessException: java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at com.atlassian.jira.upgrade.util.UpgradeUtils.doColumnsOrTablesExist(UpgradeUtils.java:316) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build70108.doUpgrade(UpgradeTask_Build70108.java:63) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSuccess(UpgradeManagerImpl.java:698) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:589) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:473) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:415) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:359) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.upgradeJira(DefaultDataImportService.java:825) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:731) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:312) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) at net.sourceforge.jtds.jdbc.TdsCore.isDataInResultSet(TdsCore.java:838) at net.sourceforge.jtds.jdbc.JtdsResultSet.<init>(JtdsResultSet.java:149) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1032) at net.sourceforge.jtds.jdbc.JtdsDatabaseMetaData.getColumns(JtdsDatabaseMetaData.java:422) at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218) at com.atlassian.jira.upgrade.util.UpgradeUtils.doColumnsOrTablesExist(UpgradeUtils.java:297) ... 19 more {code}
    via by Emiliano Sala [Atlassian],
    • java.sql.SQLException: TDS Protocol error: Invalid packet type 0xd1 at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2318) at net.sourceforge.jtds.jdbc.TdsCore.getNextRow(TdsCore.java:765) at net.sourceforge.jtds.jdbc.JtdsResultSet.next(JtdsResultSet.java:581) at net.sourceforge.jtds.jdbc.JtdsDatabaseMetaData.getColumns(JtdsDatabaseMetaData.java:427) at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)

    Users with the same issue

    Unknown visitor2 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,