com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction))

JIRA | Reetesh Kumar | 10 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Hi Bob, We are using atlassian-cli-3.9.0 and JIRA version 5.4.12. We are using following command to delete some projects: jira --action deleteProject --project "prokjectKey" The above command is working fine for most of the projects but in some cases this fails to delete projects. We have experienced following error in JIRA log: ------------------- 2016-05-08 10:54:44,476 http-bio-8080-exec-118 ERROR anonymous 638x278692x1 - 172.18.16.166,172.18.13.241,172.18.14.165 /rpc/soap/jirasoapservice-v2 [atlassian.jira.project.DefaultProjectManager] Exception removing issues com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:311) ---------------------- On command line interface we are getting below error message: --------------------- Remote error: ; nested exception is: java.net.SocketException: Connection reset Sun May 8 10:43:36 GMT 2016 Could not deleted Project with key: AU --------------------- Once we checked the database, then we found that some of the projects are not deleted but some of them were deleted in spite of these errors. So my question is that can you please confirm that whether these deleted projects are deleted successfully along with their related data or only partial data were removed of deleted projects as during deletion we were getting above error. Can you please suggest any solution in order to prevent these errors, as we have so many projects (about 1600) to delete. Thanks, Reetesh

    JIRA | 10 months ago | Reetesh Kumar
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction))
  2. 0

    Hi Bob, We are using atlassian-cli-3.9.0 and JIRA version 5.4.12. We are using following command to delete some projects: jira --action deleteProject --project "prokjectKey" The above command is working fine for most of the projects but in some cases this fails to delete projects. We have experienced following error in JIRA log: ------------------- 2016-05-08 10:54:44,476 http-bio-8080-exec-118 ERROR anonymous 638x278692x1 - 172.18.16.166,172.18.13.241,172.18.14.165 /rpc/soap/jirasoapservice-v2 [atlassian.jira.project.DefaultProjectManager] Exception removing issues com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:311) ---------------------- On command line interface we are getting below error message: --------------------- Remote error: ; nested exception is: java.net.SocketException: Connection reset Sun May 8 10:43:36 GMT 2016 Could not deleted Project with key: AU --------------------- Once we checked the database, then we found that some of the projects are not deleted but some of them were deleted in spite of these errors. So my question is that can you please confirm that whether these deleted projects are deleted successfully along with their related data or only partial data were removed of deleted projects as during deletion we were getting above error. Can you please suggest any solution in order to prevent these errors, as we have so many projects (about 1600) to delete. Thanks, Reetesh

    JIRA | 10 months ago | Reetesh Kumar
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction))
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Our jira suffers from a bug that resets the issue type schemes of a lot of projects to the default one. After consulting with the support (https://support.atlassian.com/servicedesk/customer/portal/22/JSP-268659) i was able to find out the root cause: a dangerous DELETE.. WHERE ... statement: {code} com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM configurationcontext WHERE FIELDCONFIGSCHEME=? (Deletion from CONFIGURATIONCONTEXT is forbidden!!!)) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM configurationcontext WHERE FIELDCONFIGSCHEME=? (Deletion from CONFIGURATIONCONTEXT is forbidden!!!)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:305) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.removeByAnd(WrappingOfBizDelegator.java:157) at com.atlassian.jira.issue.context.persistence.FieldConfigContextPersisterImpl.removeContextsForConfigScheme(FieldConfigContextPersisterImpl.java:89) at com.atlassian.jira.issue.context.persistence.CachingFieldConfigContextPersister.removeContextsForConfigScheme(CachingFieldConfigContextPersister.java:122) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.updateFieldConfigScheme(FieldConfigSchemeManagerImpl.java:242) at com.atlassian.jira.web.action.admin.issuetypes.pro.AssociateIssueTypeSchemes.run(AssociateIssueTypeSchemes.java:134) at com.atlassian.jira.web.action.admin.issuetypes.pro.AssociateIssueTypeSchemes.doExecute(AssociateIssueTypeSchemes.java:110) at com.atlassian.jira.web.action.admin.issuetypes.pro.SelectIssueTypeSchemeForProject.doExecute(SelectIssueTypeSchemeForProject.java:204) at webwork.action.ActionSupport.execute(ActionSupport.java:165) .... {code} Please note the WHERE clause - it will deleted all issue type associations that share the same issue type scheme. The "..forbidden.." message is from the trigger I created in order to debug the issue: {code} create trigger CONF_CONTEXT_GUARDIAN on CONFIGURATIONCONTEXT for delete as begin rollback transaction raiserror 17000 'Deletion from CONFIGURATIONCONTEXT is forbidden!!!' end {code}

    Atlassian JIRA | 10 months ago | Svetlin Zarev
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM configurationcontext WHERE FIELDCONFIGSCHEME=? (Deletion from CONFIGURATIONCONTEXT is forbidden!!!))

    Root Cause Analysis

    1. com.atlassian.jira.exception.DataAccessException

      org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction))

      at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd()
    2. com.atlassian.jira
      DefaultOfBizDelegator.removeByAnd
      1. com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:311)
      1 frame