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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

694 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you