java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Hi, From the following documentation: http://confluence.atlassian.com/display/JIRA03x/Changing+Custom+Field+Types bq.When moving back from a multi select list a select list, you have to make sure that only one item is selected for each multi select list. I think you should change this sentence above to: When moving back from Multi Select List to a Select List, you have to remove the default value of the Multi Select. In addition to that, please make sure that no issue that has multiple Multi Select List values. Otherwise, the issue will have no Select List value after conversion. The following error will occured during issue creation if the Multi Select List has default value before conversion: {noformat} ... java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String at com.atlassian.jira.issue.customfields.impl.StringCFType.getObjectFromDbValue(StringCFType.java:25) ... {noformat} The solution for this error is to delete the default value of the Multi Select List by hacking the database directly: {noformat} delete from genericconfiguration where ID=<value_of_your_multi_select_default_value>; {noformat} If you are not sure which ID, you could do a select query and look for the XMLVALUE column where you can spot the default value: {noformat} select * from genericconfiguration; {noformat} Restart your JIRA for the changes to take effect. Do not hesitate to let me know if you need more description. Cheers, Janet
    via by Janet Albion [Atlassian],
  • Hi, From the following documentation: http://confluence.atlassian.com/display/JIRA03x/Changing+Custom+Field+Types bq.When moving back from a multi select list a select list, you have to make sure that only one item is selected for each multi select list. I think you should change this sentence above to: When moving back from Multi Select List to a Select List, you have to remove the default value of the Multi Select. In addition to that, please make sure that no issue that has multiple Multi Select List values. Otherwise, the issue will have no Select List value after conversion. The following error will occured during issue creation if the Multi Select List has default value before conversion: {noformat} ... java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String at com.atlassian.jira.issue.customfields.impl.StringCFType.getObjectFromDbValue(StringCFType.java:25) ... {noformat} The solution for this error is to delete the default value of the Multi Select List by hacking the database directly: {noformat} delete from genericconfiguration where ID=<value_of_your_multi_select_default_value>; {noformat} If you are not sure which ID, you could do a select query and look for the XMLVALUE column where you can spot the default value: {noformat} select * from genericconfiguration; {noformat} Restart your JIRA for the changes to take effect. Do not hesitate to let me know if you need more description. Cheers, Janet
    via by Janet Albion [Atlassian],
    • java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String at com.atlassian.jira.issue.customfields.impl.StringCFType.getObjectFromDbValue(StringCFType.java:25)
    No Bugmate found.