'Passed List Had More Than One Value' when click on project's permission / missing project permission
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
A Project Permission is missing from Project Overview page. Clicking on the 'Permissions' link in the Project Administration sidebar results in the following error:
java.lang.IllegalArgumentException: Passed List had more than one value.
Hide stack trace
java.lang.IllegalArgumentException: Passed List had more than one value.
at org.ofbiz.core.entity.EntityUtil.getOnly(EntityUtil.java:62)
at com.atlassian.jira.projectconfig.contextproviders.ProjectPermissionContextProvider.getProjectPermissionsScheme(ProjectPermissionContextProvider.java:158)
at com.atlassian.jira.projectconfig.contextproviders.ProjectPermissionContextProvider.getContextMap(ProjectPermissionContextProvider.java:83)
at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.initContextMap(CacheableContextProviderDecorator.java:70)
at com.atlassian.jira.plugin.webfragment.CacheableContextProviderDecorator.getContextMap(CacheableContextProviderDecorator.java:46)
at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144)
at com.atlassian.jira.projectconfig.tab.WebPanelTab.getTab(WebPanelTab.java:75)
at com.atlassian.jira.projectconfig.servlet.PanelServlet.outputTab(PanelServlet.java:163)
at com.atlassian.jira.projectconfig.servlet.PanelServlet.doGet(PanelServlet.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.atlassian.jira.web.filters.XContentTypeOptionsNoSniffFilter.doFilter(XContentTypeOptionsNoSniffFilter.java:22)
.
.
.
.
原因
This can be caused by a duplicated permission scheme within the project configurations.
診断
Diagnostic Steps
Run the following SQL query against your database to identify duplicated permission schemes that may exist in the nodeassociation table. If the query returns any results, you have a duplicate permission scheme.
select n.sink_node_entity, p.* FROM (SELECT source_node_id, COUNT(source_node_id) FROM nodeassociation WHERE sink_node_entity='PermissionScheme' GROUP BY source_node_id HAVING (COUNT(source_node_id) > 1) ORDER by source_node_id) as A inner join nodeassociation n on n.source_node_id = A.source_node_id and n.sink_node_entity ='PermissionScheme' left outer join permissionscheme p on p.ID = n.SINK_NODE_ID;
ソリューション
Delete from nodeassociation table for the duplicated entry:
If the ID's in the rows are the same, this DELETE statement will remove BOTH the original and the duplicate value. If you are in this situation, you will need to re-write the original value back into the database with an appropriate INSERT statement. Each situation is unique, so it is difficult to write an example INSERT here that makes global sense. If you need assistance addressing your particular situation, please raise a ticket at http://support.atlassian.com or ask the Atlassian community at http://answers.atlassian.com.
delete from nodeassociation where sink_node_entity='PermissionScheme' and sink_node_id = xxxx ;
Replace xxx with the appropriate value from the 'ID' column of the duplicated Permission Scheme in the query in the Diagnosis section above.