-
Bug
-
Resolution: Fixed
-
Medium
-
5.1
-
5.01
-
Symptoms
JIRA will generate an error when trying to fetch a large number of change groups. This can happen when:
- Fetching change history for a large number of issues.
- Fetching change history for issues with a lot of change groups.
The following can be found within the atlassian-jira.log:
SQL Server
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, groupid, FIELDTYPE, FIELD, OLDVALUE, OLDSTRING, NEWVALUE, NEWSTRING FROM dbo.changeitem WHERE (groupid IN (?, ?, ?, ?, ?, ...) (Prepared or callable statement has more than 2000 parameter markers.) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:120) at com.atlassian.jira.issue.changehistory.ChangeHistoryBatch.fetchAllChangeItems(ChangeHistoryBatch.java:160) at com.atlassian.jira.issue.changehistory.ChangeHistoryBatch.access$400(ChangeHistoryBatch.java:39) at com.atlassian.jira.issue.changehistory.ChangeHistoryBatch$BatchingChangeHistory.getChangeItems(ChangeHistoryBatch.java:272)
Oracle
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, groupid, FIELDTYPE, FIELD, OLDVALUE, OLDSTRING, NEWVALUE, NEWSTRING FROM changeitem WHERE (groupid IN (?, ?, ?, ?, ?, ...) (ORA-01795: maximum number of expressions in a list is 1000) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:120) at com.atlassian.jira.issue.changehistory.ChangeHistoryBatch.fetchAllChangeItems(ChangeHistoryBatch.java:160) at com.atlassian.jira.issue.changehistory.ChangeHistoryBatch.access$400(ChangeHistoryBatch.java:39) at com.atlassian.jira.issue.changehistory.ChangeHistoryBatch$BatchingChangeHistory.getChangeItems(ChangeHistoryBatch.java:272)
Cause
The ChangeHistoryBatch can build SELECT statements with excessively large IN clauses in JIRA 5.1, leading to errors in Activity Streams, GreenHopper, and other plugins that use the ChangeHistoryManager.
Workaround
There is no current workaround at this stage.
- is related to
-
JRASERVER-29600 JIRA with more than 1000 projects throws error ORA-01795
- Closed
- relates to
-
JRASERVER-29242 ChangeHistoryBatch.fetchAllChangeGroups() fails with large number of input issues
- Closed