Indexing or Cloning Issues in JIRA Throws Indexing Completed with 1 errors
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Symptom 1
When cloning an issue, Jira throws the following exception but the cloned issue is created successfully:
Exception: com.atlassian.jira.index.IndexingFailureException: Indexing completed with 1 errors
Additionally, the cloned issue contains a number of history items marked as completed "Just now" instead of the expected date and time and the following appears in the atlassian-jira.log
file:
2015-03-03 09:48:31,927 http-bio-7615-exec-18 WARN sysadmin 588x145x1 1yymjr3 127.0.0.1 /secure/CloneIssueDetails.jspa [atlassian.jira.index.AccumulatingResultBuilder] Indexing failed for Issue - '213918'
2015-03-03 09:48:31,927 http-bio-7615-exec-18 WARN sysadmin 588x145x1 1yymjr3 127.0.0.1 /secure/CloneIssueDetails.jspa [atlassian.jira.index.AccumulatingResultBuilder] com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
java.lang.RuntimeException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
at com.atlassian.jira.index.DefaultIndex$Failure.<init>(DefaultIndex.java:123)
at com.atlassian.jira.issue.index.DefaultIssueIndexer$2.perform(DefaultIssueIndexer.java:208)
at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:337)
at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:333)
at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:9)
at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:5)
...
Caused by: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:38)
at com.atlassian.jira.issue.changehistory.ChangeHistoryItem$Builder.on(ChangeHistoryItem.java:440)
at com.atlassian.jira.issue.changehistory.DefaultChangeHistoryManager.getAllChangeItems(DefaultChangeHistoryManager.java:204)
at com.atlassian.jira.issue.index.DefaultChangeHistoryRetriever.apply(DefaultChangeHistoryRetriever.java:44)
Cause
The changegroup table has an empty CREATED column.
Symptom 2
Reindexing Jira throws IndexingFailureException
and the following appears in the atlassian-jira.log
file:
2015-02-19 19:37:30,778 JiraTaskExectionThread-1 WARN sysadmin 1048x628x1 pkp67f 127.0.0.1 /secure/admin/IndexReIndex.jspa [atlassian.jira.index.AccumulatingResultBuilder] com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
2015-02-19 19:38:31,244 JiraTaskExectionThread-1 ERROR sysadmin 1048x628x1 pkp67f 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All FAILED. Indexer: DefaultIndexManager: paths: [/opt/jira/jira_home/caches/indexes/comments, /opt/jira/jira_home/caches/indexes/issues, /opt/jira/jira_home/caches/indexes/changes]
com.atlassian.jira.index.IndexingFailureException: Indexing completed with 99 errors
at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:192)
at com.atlassian.jira.issue.index.DefaultIndexManager.doIndexIssuesInBatchMode(DefaultIndexManager.java:1021)
at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:988)
at com.atlassian.jira.issue.index.DefaultIndexManager.access$300(DefaultIndexManager.java:92)
...
Cause
The changegroup table has an empty CREATED column.
Symptom 3
Reindexing Jira throws IndexingFailureException
and the following appears in the atlassian-jira.log
file:
2021-12-15 00:53:34,510+0000 IssueIndexer:thread-3 WARN sysadmin 950x6571x1 1diaqq5 127.0.0.1 /secure/admin/IndexReIndex!reindex.jspa [c.a.jira.index.AccumulatingResultBuilder] com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
java.lang.RuntimeException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
at com.atlassian.jira.index.DefaultIndex$Failure.<init>(DefaultIndex.java:100)
at com.atlassian.jira.issue.index.DefaultIssueIndexer$EntityOperation.lambda$perform$6(DefaultIssueIndexer.java:858)
at java.base/java.util.HashMap.forEach(HashMap.java:1336)
at com.atlassian.jira.issue.index.DefaultIssueIndexer$EntityOperation.perform(DefaultIssueIndexer.java:858)
at com.atlassian.jira.issue.index.DefaultIssueIndexer.lambda$processBatch$2(DefaultIssueIndexer.java:334)
at com.atlassian.jira.index.SimpleIndexingStrategy.apply(SimpleIndexingStrategy.java:7)
at com.atlassian.jira.index.SimpleIndexingStrategy.apply(SimpleIndexingStrategy.java:5)
at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:47)
at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:43)
at com.atlassian.jira.util.concurrent.BoundedExecutor$2.call(BoundedExecutor.java:68)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: parameter should not be null!
at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:32)
at com.atlassian.jira.issue.changehistory.ChangeHistoryItem$Builder.on(ChangeHistoryItem.java:381)
at com.atlassian.jira.issue.history.AbstractDateRangeBuilder.changeItemBuilder(AbstractDateRangeBuilder.java:97)
at com.atlassian.jira.issue.history.VersionDateRangeBuilder.createInitialChangeItem(VersionDateRangeBuilder.java:69)
Cause
The jiraissue table has an empty CREATED column.
Diagnostic Steps
Symptom 1
Run the following query, replacing <ISSUENUM>
and <PKEY>
with the respective issue key and PKEY of the project:
select * from changegroup where CREATED is null and issueid in (select id from jiraissue where issuenum=<ISSUENUM> and project in (select id from project where pkey='<PKEY>'));
If the query returns any entries, the instance is affected by this problem.
The Issue - '213918'
record in the log snippet above corresponds to issue ID in the jiraissue table.
Symptom 2
Run the following query:
select distinct issueid from changegroup where CREATED is null;
If the query returns any entries, the instance is affected by this problem.
Symptom 3
Run the following query:
select * from jiraissue where created IS NULL
If the query returns any entries, the instance is affected by this problem.
Resolution or Workaround
Before your begin
Back up the database so that the changes can be rolled back in case of any problems.
Resolving the cause of symptoms 1 and 2
If your instance is displaying symptoms 1 or 2, do the following:
- Stop your Jira instance.
Manually update the changegroup table with a date value to retain history. For example:
update changegroup set CREATED='2015-01-01 00:00:00' where CREATED is null;
- Start Jira.
- If required, perform reindexing.
Resolving the cause of symptom 3
If your instance is displaying symptom 3, do the following:
- Stop your Jira instance.
From the Jira user interface, delete the issues listed in the output of the diagnostic step for symptom 3.
If Jira does not allow you to remove the issues, run the following database query, replacing
<ISSUE_IDs>
with a comma-separated list of the issue IDs obtained in the output of the diagnostic step:delete from jiraissue where id in (<ISSUE_IDs>);
For example:
delete from jiraissue where id in (10101, 10102, 10103, 10104, 10105);
- Start Jira.
- If required, perform reindexing.