-
Bug
-
Resolution: Low Engagement
-
Medium
-
None
-
3.1.1, 3.1.2
-
Severity 3 - Minor
-
1
-
I've got an own crowd plugin in the marketplace which uses freemarker templates in combination with xwork actions. Using multiple actions in one namespace is common and did work without any problems until 3.1. Now an exception like this is thrown:
2018-03-21 19:57:20,510 localhost-startStop-1 ERROR [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to disp atch event [com.atlassian.crowd.event.XWorkStateChangeEvent@7b20aba3] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassi an.crowd.event.listener.XWorkChangeListener.handleEvent(com.atlassian.crowd.event.XWorkStateChangeEvent), listener=com.atlassian.crowd.event.listener.XWork ChangeListener@18417937}] java.lang.RuntimeException: Multiple entries with same key: ActionKey{namespace=/console/secure/plugins/myplugin, name=null}=com.zenofx.crowd.myplugin and ActionKey{ namespace=/console/secure/plugins/myplugin, name=null}=com.zenofx.crowd.myplugin. Listener: com.atlassian.crowd.event.listener.XWorkChangeListener event: com.atlassi an.crowd.event.XWorkStateChangeEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38) at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:88)
My atlassian-plugin.xml basically looks like this:
<xwork name="My Action" key="my.action"> <package name="mypackage" extends="default" namespace="/console/secure/plugins/mynamespace"> <default-interceptor-ref name="defaultStack"/> <action name="default" class="com.zenofx.crowd.MyAction"> <result name="success" type="freemarker">/templates/my.ftl</result> </action> <action name="upload" method="upload" class="com.zenofx.crowd.MyAction"> <result name="success" type="freemarker">/templates/my.ftl</result> </action> ... </package> </xwork>
The explanation from https://community.developer.atlassian.com/t/java-lang-illegalargumentexception-multiple-entries-with-same-key-actionkey-namespace-console-secure-plugins-crowd-sso-name-null/14877/3 seems very likely, the "name" parameter is ignored and always set to "null".
A possible workaround of course is to use different namespaces for each action, but this very much against xwork style and difficult to maintain.
Hi,
At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products.
This bug is being closed due to a lack of engagement in the last four years, including no new watchers, votes, or comments; this inactivity suggests a low impact.
Please note the comments on this thread are not being monitored.
You can read more about our bug fix policy here and how we prioritize bugs.
To learn more about our recent investments in Crowd Data Center, please check our public roadmap.
Kind regards,
Crowd Data Center