Cast error when trying to configure default value in custom field

Still need help?

The Atlassian Community is here for you.

Ask the community


When attempting to edit the default value or the options for a custom field, a System error screen will appear and a cast exception is thrown.

The following appears in the atlassian-jira.log:

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
       at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(
        at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(
        at com.atlassian.jira.issue.fields.CustomFieldImpl.populateDefaults(
        at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.populateDefaults(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(


The default value for the affected custom field is stored under the genericconfiguration table. To discover which entry is related with the problematic custom field, we will need to first discover the field configuration id for this custom field. Therefore, please run the query below, replacing 'XXXXX' with the ID of the custom field.

SELECT * FROM fieldconfiguration WHERE fieldid = 'customfield_XXXXX';

If you are not sure about the custom field id that you need to look for on the query above, you might discover it upon running the query below. Please replace the query below with the custom field name and run it.



Seems that the default value for the affected custom field has an invalid value on the genericconfiguration table.


Perform a database backup, so this way you can prevent any data loss caused by a wrong manipulation on JIRA data.

  1. Shutdown JIRA.
  2. Get the rows from genericconfiguration table which needs to be deleted. You can discover which entries must be deleted by running the following query:

    SELECT * FROM genericconfiguration WHERE datakey = 'ID OF FIELDCONFIGURATION ENTRY'

    (info) The field configuration id is the one get from the query mentioned on "Diagnosis" section on this article.

  3. Delete the returned results from query above.

Last modified on Nov 2, 2018

Was this helpful?

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