allure-framework / allure-bamboo

Allure plugin for Atlassian Bamboo
Apache License 2.0
26 stars 20 forks source link

The plugin doesn't work on Bamboo 9.3 #311

Closed tomkeiev closed 5 months ago

tomkeiev commented 10 months ago

After setting up the latest plugin on Bamboo it throws an exception when trying to generate a report

AllureBuildCompleteAction: io.qameta.allure.bamboo.AllureBuildCompleteAction (java.lang.NoClassDefFoundError : com/fasterxml/jackson/dataformat/yaml/YAMLMapper)

java.lang.NoClassDefFoundError: com/fasterxml/jackson/dataformat/yaml/YAMLMapper at io.qameta.allure.bamboo.AllureExecutableProvider.lambda$provide$1(AllureExecutableProvider.java:62) at java.base/java.util.Optional.map(Optional.java:265) at io.qameta.allure.bamboo.AllureExecutableProvider.provide(AllureExecutableProvider.java:58) at io.qameta.allure.bamboo.AllureExecutableProvider.provide(AllureExecutableProvider.java:82) at io.qameta.allure.bamboo.AllureBuildCompleteAction.execute(AllureBuildCompleteAction.java:125) at com.atlassian.bamboo.chains.ChainPluginSupportImpl.lambda$chainCompleted$2(ChainPluginSupportImpl.java:137) at com.atlassian.bamboo.chains.ChainPluginSupportImpl$1.call(ChainPluginSupportImpl.java:97) at com.atlassian.bamboo.chains.ChainPluginSupportImpl$1.call(ChainPluginSupportImpl.java:93) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:55) at com.atlassian.bamboo.chains.ChainPluginSupportImpl.callActionFunction(ChainPluginSupportImpl.java:93) at com.atlassian.bamboo.chains.ChainPluginSupportImpl.lambda$withCustomVariableContext$0(ChainPluginSupportImpl.java:85) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:107) at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:31) at com.atlassian.bamboo.chains.ChainPluginSupportImpl.withCustomVariableContext(ChainPluginSupportImpl.java:85) at com.atlassian.bamboo.chains.ChainPluginSupportImpl.chainCompleted(ChainPluginSupportImpl.java:135) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.orm.hibernate5.support.OpenSessionInterceptor.invoke(OpenSessionInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:220) at com.sun.proxy.$Proxy322.chainCompleted(Unknown Source) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.finaliseChainStateIfChainExecutionHasCompleted(ChainExecutionManagerImpl.java:1158) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.lambda$execute$3(ChainExecutionManagerImpl.java:719) at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:302) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.execute(ChainExecutionManagerImpl.java:633) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.access$1300(ChainExecutionManagerImpl.java:149) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2$1.run(ChainExecutionManagerImpl.java:482) at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:302) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.run(ChainExecutionManagerImpl.java:467) at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:302) at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.onBuildFinished(ChainExecutionManagerImpl.java:453) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42) at com.atlassian.event.internal.ComparableListenerInvoker.invoke(ComparableListenerInvoker.java:48) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) at com.atlassian.bamboo.security.ImpersonationHelper.lambda$makeRunnableWithSystemAuthority$0(ImpersonationHelper.java:38) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.yaml.YAMLMapper not found by io.qameta.allure.allure-bamboo [122] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527) ... 50 more

PBrzemo commented 10 months ago

Hi have the same issue currently with server version of bamboo 9.2.1 and executable for allure 2.22.0

mstankov97 commented 10 months ago

I managed to fix this by changing the pom.xml and rebuilding the project.

Get the source code Edit the pom.xml file

1 <dependency> 2 <groupId>com.fasterxml.jackson.dataformat</groupId> 3 <artifactId>jackson-dataformat-yaml</artifactId> 4 <version>2.14.2</version> 5 <scope>provided</scope> 6 </dependency>

7 <dependency> 8 <groupId>com.fasterxml.jackson.core</groupId> 9 <artifactId>jackson-databind</artifactId> 10 <version>2.14.2</version> 11 <scope>provided</scope> 12 </dependency>

Remove the <scope>provided</scope> , This stackoverflow answer can tell you more about <scope>.

I also removed all the jackson-related exclusions , just in case , not entirely sure if this is needed . for example: <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </exclusion>

re-build the project using the mvnw and installed the new jar I got .

vbragin commented 8 months ago

@mstankov97 Thank you for research. will try to have a look and fix it soon.

vbragin commented 8 months ago

Please try 1.17.0

tomkeiev commented 8 months ago

@vbragin the plugin works on Bamboo 9.3.4 build 90306