Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-5088

More than one xwork action in a namespace doesn't work anymore

    • Icon: Bug Bug
    • Resolution: Low Engagement
    • Icon: Medium Medium
    • None
    • 3.1.1, 3.1.2
    • Plugins

      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.

            [CWD-5088] More than one xwork action in a namespace doesn't work anymore

            Atlassian Update - 9 April 2025

            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

            Ishwinder Kaur added a comment - Atlassian Update - 9 April 2025 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

            zenofx.com added a comment -

            Sorry for being impatient, but as the reporter I just want to make clear that

            • Yes, there is a workaround
            • This bug probably hits most plugins with an own UI
            • The workaround leads to really ugly and badly maintainable code
            • So the epic "Priority Bugfix" looks just right

            zenofx.com added a comment - Sorry for being impatient, but as the reporter I just want to make clear that Yes, there is a workaround This bug probably hits most plugins with an own UI The workaround leads to really ugly and badly maintainable code So the epic "Priority Bugfix" looks just right

            Hi All,

            Any update on the this?

            Lokesh Naktode added a comment - Hi All, Any update on the this?

            Thanks tom87 for raising this issue. Indeed it looks like a bug in Crowd and the workaround you've mentioned may potentially resolve the problem.

            Marcin Kempa added a comment - Thanks tom87 for raising this issue. Indeed it looks like a bug in Crowd and the workaround you've mentioned may potentially resolve the problem.

              Unassigned Unassigned
              474c8ea9705b zenofx.com
              Affected customers:
              5 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: