Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,368
Community Members
 
Community Events
184
Community Groups

What does the error mean "There is no Action mapped for namespace [/build/result] " ?

Edited

Hi,

Need some help, I have spent quite a bit of time on this apparently simple part of plugin development.

My Atlassian plugin xml has the below. Also, I have the action class RobotReportDetails extended from ViewBuildResults.

public class RobotReportDetails extends ViewBuildResults {

public String doExecute() throws Exception {
String strBuildList = super.doExecute();
return strBuildList;
}

public String getArtifactReport(){
return getSharedArtifactPath();
//return "Path to Artifact Report";
}

public String getArtifactLog(){
return "Path to Artifact Log";
}
}

atlassian-plugin.xml

<xwork key="viewRobotReport" name="View Robot Report">
<package name="RobotPlugin" extends="buildResultView">
<action name="viewRobotReport" class="isode.bamboo.RobotTestTask.RobotReportDetails">
<result name="success" type="freemarker">viewRobotReport.ftl</result>
</action>
</package>
</xwork>

<web-item key="RobotJob-${planKey}-${buildNumber}" name="RobotReport" section="results.subMenu/results" weight="80">
<label key="Robot Report"/>
<link linkId="RobotBuild-${planKey}-${buildNumber}">/build/result/viewRobotReport.action?buildKey=${planKey}&amp;buildNumber=${buildNumber}</link>
<condition class="isode.bamboo.RobotTestTask.RobotReportDetailsViewCondition"/>
</web-item>

Console Logs..

[INFO] [talledLocalContainer] 2018-05-02 10:21:03,137 INFO [http-nio-6990-exec-2] [AccessLogFilter] admin GET http://172.20.1.30:6990/bamboo/build/result/viewRobotReport.action?buildKey=TPROJ1-TPLAN1-JOB1&buildNumber=61&_=1525252860943 148384kb
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,138 ERROR [http-nio-6990-exec-2] [BambooStrutsUnknownHandler] There is no Action mapped for namespace [/build/result] and action name [viewRobotReport] associated with context path [/bamboo].
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,244 INFO [http-nio-6990-exec-8] [AccessLogFilter] admin GET http://172.20.1.30:6990/bamboo/build/result/viewRobotReport.action?buildKey=TPROJ1-TPLAN1-JOB1&buildNumber=61 200988kb
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,245 ERROR [http-nio-6990-exec-8] [BambooStrutsUnknownHandler] There is no Action mapped for namespace [/build/result] and action name [viewRobotReport] associated with context path [/bamboo].
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,294 ERROR [http-nio-6990-exec-8] [runtime] Error executing FreeMarker template
[INFO] [talledLocalContainer] FreeMarker template error:
[INFO] [talledLocalContainer] The following has evaluated to null or missing:
[INFO] [talledLocalContainer] ==> navigationContext [in template "decorators/resultDecorator.ftl" at line 17, column 18]
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] ----

My template file has nothing but the below

<html>
<head>
<meta name="decorator" content="result"/>
</head>
<body>
</body>
</html>

Similar question on stackoverflow

I copied the struts.xml in src/main/resources directory as suggested

https://stackoverflow.com/questions/8991597/struts-hello-world-example-there-is-no-action-mapped-for-namespace-and-act

When I click on the tab on the job page I get an error 

Apologies, this page could not be properly decorated (data is missing)

Page Not found.

I can see that the struts.xml does not contain the below package definition

<package name="RobotPlugin" extends="buildResultView">
<action name="viewRobotReport" class="robot.RobotReport">
<result name="success"type="freemarker">viewRobotReport.ftl
</result>
</action>
</package>

Shouldn't the struts.xml be updated automatically by bamboo with the content present in atlassian-plugin.xml ?

Could anyone please help ?

Regards,

kshitij

 

1 answer

I found what the problem was when I was looking at all the logs of atlas-run. I could the the below in the logs..

[INFO] [talledLocalContainer] 2018-05-03 13:30:07,737 ERROR [localhost-startStop-1] [BambooPluginUtils] A problem has occurred when instantiating action class [robot.RobotReport], skipping action [viewRobotReport]
[INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'robot.RobotReport': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.atlassian.bamboo.storage.StorageLocationService com.atlassian.bamboo.build.ViewBuildResults.storageLocationService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bamboo.storage.StorageLocationService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

I fixed it in the code by doing the below..

import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import com.atlassian.plugin.spring.scanner.annotation.component.Scanned;

@Scanned
public class RobotReport extends ViewBuildResults {

    public RobotReport(@ComponentImport StorageLocationService storageLocationService){

Useful link

https://community.developer.atlassian.com/t/spring-autowiring-issues-when-extending-viewbuildresults/14766/2

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events