XWwork Actions in Atlassian Bamboo
I have setup a webitem in my atlassian-plugin.xml and defined an xwork action.
But when I try to call this action which will render a velocity template, Bamboo always says, that an action for package and contextpath is not defined and that the action is not allowed. See small stacktrace and error log beneath.
It is the only action I have defined therefor the package name is unique.
[INFO] [talledLocalContainer] 2018-02-01 18:42:35,210 ERROR [http-nio-6990-exec-7] [BambooStrutsUnknownHandler] There is no Action mapped for namespace [/plugins/secsign] and action name [ViewSecSignIDOptions] associated with context path [/bamboo].
[INFO] [talledLocalContainer] 2018-02-01 18:42:49,355 WARN [http-nio-6990-exec-7] [Dispatcher] Could not find action or result: /bamboo/plugins/secsign/ViewSecSignIDOptions!show.action
[INFO] [talledLocalContainer] Method show for action ViewSecSignIDOptions is not allowed! - [unknown location]
[INFO] [talledLocalContainer] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:200)
[INFO] [talledLocalContainer] at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
I'm using setter injection in the corresponding class which inherits from com.atlassian.bamboo.ww2.BambooActionSupport which extends com.opensymphony.xwork2.ActionSupport
I'm currently running Bamboo 6.0.0 build 60001. But the error is the same in 5.9.x and 5.10.x
And the definitions in my atlassian-plugin.xml look like:
<xwork name="secsign-id-options" key="secsign-id-options">
<description key="secsign-id-options">SecSign ID Options</description>
<package name="secsign-id-options" extends="default" namespace="/plugins/secsign">
<default-interceptor-ref name="defaultStack" />
<action name="ViewSecSignIDOptions!show" class="com.secsign.bamboo.actions.SecSignIDPluginManagementAction" method="doShow">
<result name="success" type="velocity">/templates/secsignid-options-and-users-page.vm
</result>
<result name="input" type="velocity">/templates/secsignid-options-and-users-page.vm
</result>
<result name="error" type="velocity">/templates/secsignid-options-and-users-page.vm
</result>
<result name="options" type="velocity">/templates/secsignid-options-page.vm
</result>
<result name="users" type="velocity">/templates/secsignid-users-page.vm
</result>
</action>
</package>
</xwork>
<web-item key="secsign_id_menu" name="SecSign ID top navigation menu" i18n-name-key="secsign_id_menu.title" section="header.global.primary" weight="40">
<label key="secsignid.menu.label">SecSign ID</label>
<link linkId="secsignid_options">/plugins/secsign/ViewSecSignIDOptions!show.action</link>
<!--<condition class="com.atlassian.bamboo.plugins.web.conditions.AdministerPlanPermissionCondition"/>-->
<description key="secsignid.menu.description">Options and user mappings for SecSign ID</description>
<tooltip key="secsignid.menu.tooltip">Options and user mappings for SecSign ID</tooltip>
</web-item>
Cheers
Titus
链接地址: http://www.djcxy.com/p/87270.html