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

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

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)
...

or

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)

or

    com.atlassian.cache.CacheException: java.lang.IllegalArgumentException: Passed List had more than one value.
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:217\) \[atlassian-cache-memory-2.13.7.jar:\?]
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:168\) \[atlassian-cache-memory-2.13.7.jar:\?]
	at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.hasColumnLayout(DefaultColumnLayoutManager.java:255\) \[classes/:\?]
	at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.hasColumnLayout(DefaultColumnLayoutManager.java:245\) \[classes/:\?]
	at com.atlassian.jira.issue.search.DefaultSearchRequestManager.deleteSearchRequest(DefaultSearchRequestManager.java:217\) \[classes/:\?]

This problem can also occur without user input if a user has subscribed to a saved filter search, in which case the following error will be seen in the Jira outbound mail logs:

2024-06-24 00:00:00,000+0000 Sending mailitem com.atlassian.jira.mail.SubscriptionSingleRecepientMailQueueItem owner: 'username' ERROR anonymous    Mail Queue Service [c.a.jira.mail.SubscriptionSingleRecepientMailQueueItem] 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.get(DelegatingCache.java:214)
	at com.atlassian.cache.memory.DelegatingCache.get(DelegatingCache.java:165)
	at com.atlassian.cache.impl.metrics.InstrumentedCache.get(InstrumentedCache.java:72)
	at com.atlassian.jira.cache.stats.CacheWithStats.get(CacheWithStats.java:46)
	at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getFilterColumnLayoutItems(DefaultColumnLayoutManager.java:350)
	at com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager.getColumnLayout(DefaultColumnLayoutManager.java:217)
	at com.atlassian.jira.web.component.ColumnLayoutItemProvider.getColumnLayout(ColumnLayoutItemProvider.java:43)
	at com.atlassian.jira.web.component.ColumnLayoutItemProvider.getColumns(ColumnLayoutItemProvider.java:25)
	at com.atlassian.jira.mail.SubscriptionSingleRecepientMailQueueItem.getColumns(SubscriptionSingleRecepientMailQueueItem.java:174)
	at com.atlassian.jira.mail.SubscriptionSingleRecepientMailQueueItem.getTableLayout(SubscriptionSingleRecepientMailQueueItem.java:161)
	at com.atlassian.jira.mail.SubscriptionSingleRecepientMailQueueItem.getContextParams(SubscriptionSingleRecepientMailQueueItem.java:233)
	at com.atlassian.jira.mail.SubscriptionSingleRecepientMailQueueItem.sendSearchRequestEmail(SubscriptionSingleRecepientMailQueueItem.java:118)
	at com.atlassian.jira.mail.SubscriptionSingleRecepientMailQueueItem.send(SubscriptionSingleRecepientMailQueueItem.java:103)

Diagnosis

The query below will return a list of users or filters (searchrequests) which have duplicate column layout data with different IDs.

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

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

Rows appearing in the results are be affected by the problem of having duplicate ID's in the columnlayout and columnlayoutitems tables.

Cause

Search breaks because of duplicate data (username or searchrequest) in the database. This occurs due to the data which were edited directly in database, causing the columnlayout table to have duplicate rows 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 or filters (searchrequests) with duplicate column layout data by running this query in the database:

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

    Any rows who appears in the results will be affected by the problem of having duplicate columnlayout data.

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

    mysql> select * from columnlayout where username='costell';
    +-------+----------+---------------+
    | ID    | USERNAME | SEARCHREQUEST |
    +-------+----------+---------------+
    | 10171 | costell  |          NULL |
    | 11777 | costell  |          NULL |
    +-------+----------+---------------+
    2 rows in set (0.04 sec)
    
    
    
    or 
    
    
    +-------+----------+---------------+
    | ID    | USERNAME | SEARCHREQUEST |
    +-------+----------+---------------+
    | 11776 | NULL     |         13340 |
    | 11777 | NULL     |         13340 |
    +-------+----------+---------------+
    2 rows in set (0.04 sec)
  3. Delete the offending row from columnlayout and related columnlayoutitem tables. 

    mysql> delete from columnlayoutitem where columnlayout = 11777;
    Query OK, 17 row affected (0.10 sec)
    mysql> delete from columnlayout where id = 11777;
    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 Nov 25, 2024

Was this helpful?

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