Indexing Jira throws "LocalDate only handles the Common Era - no BC dates are allowed" error.

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following errors are thrown when trying to reindex:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: LocalDate only handles the Common Era - no BC dates are allowed.
	at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35)
	at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82)
....
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: LocalDate only handles the Common Era - no BC dates are allowed.
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
	at com.atlassian.jira.index.FutureResult.await(FutureResult.java:31)
	... 26 more
Caused by: java.lang.IllegalArgumentException: LocalDate only handles the Common Era - no BC dates are allowed.
	at com.atlassian.jira.datetime.LocalDateFactory.from(LocalDateFactory.java:63)
	at com.atlassian.jira.datetime.LocalDateFactory.from(LocalDateFactory.java:35)
	at com.atlassian.jira.issue.index.indexers.impl.DueDateIndexer.addIndex(DueDateIndexer.java:29)


Cause

There is an issue in Jira that has a due date set in the BC era. e.g. 0001-12-07 22:24:30+05:53:28 BC.

Solution

Run this query in database to search for the incorrect date:

select * from jiraissue where duedate < '2000-01-01'; 

Change the date to an appropriate format.  e.g. 2012-12-07 22:24:30+05:30


Last modified on Jan 18, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.