JIRA Crashes while Creating an Issue

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following error appeared while creating a JIRA issue:

 
...
Cause:
com.thoughtworks.xstream.mapper.CannotResolveClassException: java.util.Collections-UnmodifiableList : java.util.Collections-UnmodifiableList

Stack Trace: [hide]

com.thoughtworks.xstream.mapper.CannotResolveClassException: java.util.Collections-UnmodifiableList : java.util.Collections-UnmodifiableList
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:68)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:71)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
...
at com.atlassian.jira.issue.customfields.manager.DefaultGenericConfigManager.fromXml(DefaultGenericConfigManager.java:139)
at com.atlassian.jira.issue.customfields.manager.DefaultGenericConfigManager.retrieve(DefaultGenericConfigManager.java:94)
at com.atlassian.jira.issue.customfields.manager.CachedGenericConfigManager.retrieve(CachedGenericConfigManager.java:72)
at com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType.getDefaultValue(AbstractMultiCFType.java:77)
at com.atlassian.jira.issue.fields.CustomFieldImpl.populateDefaults(CustomFieldImpl.java:542)
at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.populateDefaults(FieldScreenRenderLayoutItemImpl.java:92)
at com.atlassian.jira.web.action.issue.CreateIssue.populateFieldHolderWithDefaults(CreateIssue.java:286)
at com.atlassian.jira.web.action.issue.CreateIssue.doExecute(CreateIssue.java:169)
...

The following appears in the atlassian-jira.log:

...
com.thoughtworks.xstream.mapper.CannotResolveClassException: java.util.Collections-UnmodifiableList : java.util.Collections-UnmodifiableList
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:68)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:71)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
...
at com.atlassian.jira.issue.customfields.manager.DefaultGenericConfigManager.fromXml(DefaultGenericConfigManager.java:139)
at com.atlassian.jira.issue.customfields.manager.DefaultGenericConfigManager.retrieve(DefaultGenericConfigManager.java:94)
at com.atlassian.jira.issue.customfields.manager.CachedGenericConfigManager.retrieve(CachedGenericConfigManager.java:72)
at com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType.getDefaultValue(AbstractMultiCFType.java:77)
at com.atlassian.jira.issue.fields.CustomFieldImpl.populateDefaults(CustomFieldImpl.java:542)
at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.populateDefaults(FieldScreenRenderLayoutItemImpl.java:92)
at com.atlassian.jira.web.action.issue.CreateIssue.populateFieldHolderWithDefaults(CreateIssue.java:286)
at com.atlassian.jira.web.action.issue.CreateIssue.doExecute(CreateIssue.java:169)
...

Cause

The root cause is still unknown. Past cases indicates that this problem happens only after upgrading to JIRA 4.2.x with the previous JIRA versions having a Multi User Picker custom field with an invalid default value of the custom field.

Resolution

Here are the following steps on how to fix this problem:

  1. Run the following SQL queries to find out the problematic custom field:

    select * from genericconfiguration where XMLVALUE like '%UnmodifiableRandomAccessList%';

    Which should return results like the following:

    | ID    | DATATYPE     | DATAKEY        | XMLVALUE
    +-------+--------------+----------------+----------------------------------------------------------------------------------------------------------------
    | 10335 | DefaultValue | 10508          | <java.util.Collections-UnmodifiableRandomAccessList resolves-to="java.util.Collections-$UnmodifiableList">
      <list>
        <string>joachim.ooi</string>
        <string>justin.alex</string>
        <string>janet.albion</string>
        <string>chaiying.chan</string>
        <string>kahloun.foong</string>
        <string>voonkiat.gan</string>
        <string>ahmad.faisal</string>
        <string>ali.jawad</string>
        <string>muhammad.fahd</string>
        <string>sultan.maiyaki</string>
      </list>
      <c class="list" reference="../list"/>
    </java.util.Collections-UnmodifiableRandomAccessList>

    (info) GENERICCONFIGURATION.datakey = FIELDCONFIGSCHEME.id

  2. With this information above, run the next SQL query below:

    select * from fieldconfigscheme where id = 10508;
    | ID    | configname                | DESCRIPTION                | FIELDID           | CUSTOMFIELD |
    +-------+---------------------------+----------------------------+-------------------+-------------+
    | 10508 | Staff Training & Education| Staff Training & Education | customfield_10070 |        NULL |

     

  3. Run the next SQL statement:

    select * from customfield where ID=10070;
    +-------+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+-----------+---------+-----------+
    | ID    | CUSTOMFIELDTYPEKEY                                                | CUSTOMFIELDSEARCHERKEY                                                    | cfname          | DESCRIPTION                                                                                                                                                                                                                                                                                                                        | defaultvalue | FIELDTYPE | PROJECT | ISSUETYPE |
    +-------+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+-----------+---------+-----------+
    | 10070 | com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker | com.atlassian.jira.plugin.system.customfieldtypes:userpickergroupsearcher | Notify Issue to | At Issue Creation, "Reporter" can force a number of "Users" to be advised (via email) of the issue creation.
    N.B. This does not imply they'll become automatically "watchers" of the issue.
    If they want to become "watchers" they'll have to subscribe after they'll receive the email on issue creation, by loggin in on JIRA. | NULL         |      NULL |    NULL | NULL      |
    +-------+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+-----------+---------+-----------+
    ...

    (info) FIELDCONFIGSCHEME.fieldid = CUSTOMFIELD.id

     

  4. This means that even without creating issue to replicate this problem, this problem can be seen by just going to Notify Issue to custom field (cfname) which is a Multi User Picker custom field type and clicking on 'Edit Default Value' will throws the same error as well.
  5. Try creating a similar custom field of 'Multi User Picker' and set the default value by putting in all the list of users shown above from the SQL query result to compare the default XML value of the problematic and non-problematic custom field.
  6. Execute the same SQL query as in Step 1 (select * from genericconfiguration where XMLVALUE like '%UnmodifiableRandomAccessList%';) - spot the difference below:

    Problematic:

    <list>
     <string>joachim.ooi</string>
     <string>justin.alex</string>
     <string>janet.albion</string>
     <string>chaiying.chan</string>
     <string>kahloun.foong</string>
     <string>voonkiat.gan</string>
     <string>ahmad.faisal</string>
     <string>ali.jawad</string>
     <string>muhammad.fahd</string>
     <string>sultan.maiyaki</string>
     </list>
     <c class="list" reference="../list"/>

    Compared with the non-problematic:

    <c class="list">
     <string>joachim.ooi</string>
     <string>justin.alex</string>
     <string>janet.albion</string>
     <string>chaiying.chan</string>
     <string>kahloun.foong</string>
     <string>voonkiat.gan</string>
     <string>ahmad.faisal</string>
     <string>ali.jawad</string>
     <string>muhammad.fahd</string>
     <string>sultan.maiyaki</string>
     </c>
     <list reference="../c"/>
  7. Fix this problem by updating the default content of the custom field:

    update genericconfiguration set XMLVALUE = '<java.util.Collections_-UnmodifiableRandomAccessList resolves-to="java.util.Collections$UnmodifiableList">
      <c class="list">
         <string>joachim.ooi</string>
        <string>justin.alex</string>
        <string>janet.albion</string>
        <string>chaiying.chan</string>
        <string>kahloun.foong</string>
        <string>voonkiat.gan</string>
        <string>ahmad.faisal</string>
        <string>ali.jawad</string>
        <string>muhammad.fahd</string>
        <string>sultan.maiyaki</string>
      </c>
      <list reference="../c"/>
    </java.util.Collections_-UnmodifiableRandomAccessList>' where ID=10335;

    GENERICCONFIGURATION.id = 10335

    (info) If upgrading to JIRA 5.1 and after you can alternatively use the below SQL as custom fields are stored differently. The above SQL will work as well.

    update genericconfiguration set XMLVALUE='<list>
        <string>joachim.ooi</string>
        <string>justin.alex</string>
        <string>janet.albion</string>
        <string>chaiying.chan</string>
        <string>kahloun.foong</string>
        <string>voonkiat.gan</string>
        <string>ahmad.faisal</string>
        <string>ali.jawad</string>
        <string>muhammad.fahd</string>
        <string>sultan.maiyaki</string> </list>' where ID=10335;
  8. Restart JIRA in order for it to take effect.
    (info) Take note to perform a full data backup first before proceeding with database modification.
Last modified on Mar 30, 2016

Was this helpful?

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