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

com.atlassian.bamboo.resultsummary.IncorrectResultSummaryTypeException: Result cannot be found by ke

Ali Karaca November 9, 2019

Hi, starting with 6.9.0 i'm getting an error from ViewBuildResults class which 

buildKey=ABP-PLAN&buildNumber=1.

It was working before that version now it's giving following error:

com.atlassian.bamboo.resultsummary.IncorrectResultSummaryTypeException: Result cannot be found by key 'ABP-PLAN-1' with type 'interface com.atlassian.bamboo.resultsummary.BuildResultsSummary'

How to solve this problem? Btw if manually add Job name to buildkey it works. Eg:

buildKey=ABP-PLAN-JOB1&buildNumber=1

 

 

 

atlassian-plugin.xml ->


<web-item key="netsparker-cloud-plan-report" name="Netsparker Enterprise Plan Report" section="chainResults.subMenu/chainResults" weight="50">
<description key="NetsparkerCloudReport.desc">Provides Netsparker Enterprise scan report.</description>
<label key="Netsparker Enterprise Report"/>
<link linkId="NetsparkerCloudPlanDetails">/build/result/viewNetsparkerCloudReport.action?buildKey=${buildKey}&amp;buildNumber=${buildNumber}</link>
</web-item>
<package name="NetsparkerCloudScanResult" extends="buildView" namespace="/build/result">
<action name="viewNetsparkerCloudReport" class="com.netsparker.tasks.NetsparkerCloudReport" method="default">
<result name="input" type="freemarker">/templates/task/NetsparkerCloudReport.ftl</result>
<result name="success" type="freemarker">/templates/task/NetsparkerCloudReport.ftl</result>
<result name="error" type="freemarker">/templates/task/NetsparkerCloudReport.ftl</result>
</action>
</package>

 

error info:

Version: 6.10.3
Build: 61008
Build Date: 27 Sep 2019

Request information:

  • Request URL: http://localhost:6990/bamboo/build/result/viewNetsparkerCloudReport.action
  • Scheme: http
  • Server: localhost
  • Port: 6990
  • URI: /bamboo/build/result/viewNetsparkerCloudReport.action
  • Context path: /bamboo
  • Servlet path: /build/result/viewNetsparkerCloudReport.action
  • Path info:
  • Query string: buildKey=ABP-PLAN&buildNumber=1

Stack Trace:

com.atlassian.bamboo.resultsummary.IncorrectResultSummaryTypeException: Result cannot be found by key 'ABP-PLAN-1' with type 'interface com.atlassian.bamboo.resultsummary.BuildResultsSummary'
	at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.getResultsSummary(BuildResultsSummaryManagerImpl.java:185)
	at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.getResultsSummary(BuildResultsSummaryManagerImpl.java:175)
	at sun.reflect.GeneratedMethodAccessor1287.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:22)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	...

 

3 answers

1 accepted

1 vote
Answer accepted
Ali Karaca November 21, 2019

for future references whom may need, i've changed extending class from ViewBuildResults to PlanResultsAction and it worked for me

Rohan Chougule November 21, 2019

Or a simple alternative is also added below if you are using till bamboo 6.9

For 6.10 and above, use @Ali Karaca 's solution.

1 vote
Rohan Chougule November 21, 2019

Hi @Ali Karaca

I am also facing the same issue. Have you found any solution around it?

Thanks,

Rohan Chougule,

Software Engineer,

BrowserStack

Ali Karaca November 21, 2019

Hi @Rohan Chougule before answering, funny thing is while we were testing our plugin BrowserStack were giving same error too. i've checked BrowserStack's github bamboo repo which is too old. 

I've searched everywhere and waste so many time to find this so here it comes:

i've changed our NetsparkerCloudReport  class which extends

ViewBuildResults to PlanResultsAction and it worked. You can check my commit for details

https://github.com/netsparker/Netsparker-Cloud-Bamboo-Plugin/commit/579e81200c3ea5d5c6b90dbd167fa9c8f3c7aad8#diff-58e7b0775fede3747acfaa1fb0334782

Rohan Chougule November 21, 2019

Thanks for the response @Ali Karaca

Your solution seems like a proper fix by extending the PlanResultsAction instead of the Builds one.

Bamboo seems to have changed the way they retrieve the builds data and haven't documented anywhere. (or probably they have, but I couldn't find it.)

Thanks again!

Ali Karaca November 21, 2019

@Rohan Chougule you are welcome! I've wasted few days to find this made me went insane glad to hear that work and saved your time. Bamboo documentation is so outdated and atlassian doesn't care. Like you've said there is no info about it, i couldn't find either. Seems like i've lucky to find an answer. If you solve an issue like this please share the knowledge. 

Good luck on bamboo!

Like Rohan Chougule likes this
Rohan Chougule November 21, 2019

@Ali Karaca 

Sure I will! 

But I am still curious as to know how were you able to come up with your solution. You actually changed the class which we extend for our report generation. How did you come up with this approach? Would like to know more about it! Thanks!

0 votes
Rohan Chougule November 21, 2019

Found the solution (Till v6.9):

Just replace the buildKey query param to planKey.

The value is retrieved from the key buildKey and assigned to planKey query param.

From this

http://localhost:8085/build/result/viewBStackReport.action?buildKey=TNT-NV&buildNumber=9

 To this : 

http://localhost:8085/build/result/viewBStackReport.action?planKey=TNT-NV&buildNumber=9

In your atlassian-plugin.xml, replace it to this : 

<link linkId="NetsparkerCloudPlanDetails">/build/result/viewNetsparkerCloudReport.action?planKey=${buildKey}&amp;buildNumber=${buildNumber}</link>

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events