ClassCastException when indexing issues, due to misconfigured Script Runner scripted field

Still need help?

The Atlassian Community is here for you.

Ask the community

This problem is related to a third party plugin, and therefore not supported by Atlassian. See Atlassian Supported Plugins​ for more information.


When performing a reindex, it does not complete, showing a ClassCastException error:

Individual operations updating some issues will also fail with the same exception. The following appears in the atlassian-jira.log:

2014-12-23 17:39:50,209 http-bio-8080-exec-21 ERROR admin 1059x1112x1 141f26d 0:0:0:0:0:0:0:1 /rest/api/2/issue/TEST-2/comment [] Error re-indexing changes for issue 'TEST-2'
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double
        at com.atlassian.jira.issue.index.indexers.impl.NumberCustomFieldIndexer.addDocumentFields(
        at com.atlassian.jira.issue.index.indexers.impl.NumberCustomFieldIndexer.addDocumentFieldsSearchable(
        at com.atlassian.jira.issue.index.indexers.impl.AbstractCustomFieldIndexer.addIndex(
        at com.atlassian.jira.issue.index.IssueDocument.getDocument(


This error can be caused by a scripted field set up with the Groovy Script Runner add-on for JIRA, which has the "Searcher" configured to be a Number, while the value being returned from the script is actually a text string not containing only a number.


  • Load the "Script Fields" page in JIRA Administration
  • Go through the fields, and look for any with a Number searcher
  • Determine if the code can possibly return a string containing anything other than a number

  • Either change the searcher to be text, or change the code to return a number, depending on the desired outcome of the field

Note that the actual content of these scripts is outside the scope of Atlassian Support. For assistance with this please visit Atlassian Answers to contact the plugin vendor and/or community for support.

Last modified on Mar 30, 2016

Was this helpful?

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