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}&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
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) ...
for future references whom may need, i've changed extending class from ViewBuildResults to PlanResultsAction and it worked for me
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ali Karaca
I am also facing the same issue. Have you found any solution around it?
Thanks,
Rohan Chougule,
Software Engineer,
BrowserStack
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}&buildNumber=${buildNumber}</link>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.