com.atlassian.jira.exception.DataAccessException

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.

  • 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
    via by Reetesh Kumar,
  • 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
    via by Reetesh Kumar,
  • 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}
    via by 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 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)
    No Bugmate found.