Searches in Find Issues Screen Result in 'Passed List Had More Than One Value'

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When trying to run issue searches, JIRA produces a System Error page containing an exception like the following:

Caused by: java.lang.IllegalArgumentException: Passed List had more than one value.
at org.ofbiz.core.entity.EntityUtil.getOnly(EntityUtil.java:58)
at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getColumnLayoutItems(DefaultColumnLayoutManager.java:186)
at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getColumnLayout(DefaultColumnLayoutManager.java:106)
at com.atlassian.jira.web.component.TableLayoutFactory.getUserColumns(TableLayoutFactory.java:223)

Application log also contains the following error:

...
2009-08-21 18:40:31,292 http-8088-Processor24 ERROR [[Catalina].[localhost].[/].[action]] Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: Passed List had more than one value.
        at org.ofbiz.core.entity.EntityUtil.getOnly(EntityUtil.java:58)
        at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getColumnLayoutItems(DefaultColumnLayoutManager.java:186)
...
2015-12-02 03:03:35,950 http-bio-8080-exec-5 ERROR xxxx xx xx xx /rest/jplugs/1.0/filterResultHelper/filterFields [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.lang.IllegalArgumentException: Passed List had more than one value.
com.atlassian.cache.CacheException: java.lang.IllegalArgumentException: Passed List had more than one value.
	at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:330)
	at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getUserColumnLayout(DefaultColumnLayoutManager.java:306)
	at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getFilterColumnLayoutItems(DefaultColumnLayoutManager.java:392)

Cause

Search breaks because of duplicate usernames in the database. This occurs due to the usernames which were edited directly in database, causing the columnlayout table to have duplicate usernames with different ID's.

Resolution

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

  1. Find a list of users with duplicate usernames with different ID's by running this query in the database:

    SELECT username, COUNT(username) FROM columnlayout GROUP BY username HAVING (COUNT(username) > 1);
    

    Any user who appears in the results will be affected by the problem of having duplicate ID's.

  2. Compile a list of the users and search for them:

    mysql> select * from columnlayout where username='costell';
    +-------+----------+---------------+
    | ID    | USERNAME | SEARCHREQUEST |
    +-------+----------+---------------+
    | 10171 | costell  |          NULL |
    | 10433 | costell  |          NULL |
    +-------+----------+---------------+
    2 rows in set (0.04 sec)
    
  3. Delete the offending row:

    mysql> delete from columnlayout where id=10433;
    Query OK, 1 row affected (0.10 sec)
    
  4. Restart JIRA
    (info) If the data is not updated after restart JIRA, please force it with a COMMIT SQL command.


Last modified on Mar 11, 2019

Was this helpful?

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