Fix build failure java.lang.NoSuchMethodError with CPPUnit on Bamboo DC
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When using the Bamboo CPPUnit on Bamboo version 10.2.4, you may encounter the following error in the <bamboo-home>/logs/atlassian-bamboo.log
file, causing build plans that use CPPUnit projects to fail:
"(java.lang.NoSuchMethodError : 'com.atlassian.bamboo.task.TaskResultBuilder com.atlassian.bamboo.task.TaskResultBuilder.create(com.atlassian.bamboo.task.TaskContext)')"
Environment
The solution has been validated in Bamboo Data Center version 10.2.4 but may be applicable to other versions. This only affects Bamboo Data Center instances using CppUnit projects.
Diagnosis
Upgrading to Bamboo version 10.2.4 or later causes the Bamboo CPPUnit app v1.1 to stop working due to outdated dependencies incompatible with the new Bamboo version.
You may encounter errors in the <bamboo-home>/logs/atlassian-bamboo.log
and the plan's build log file:
ERROR [TaskExecutorImpl] Error occurred while running Task 'Parse Unit Tests' of type com.atlassian.bamboo.plugins.cppunit.bamboo-cppunit-plugin:test.
java.lang.NoSuchMethodError: 'com.atlassian.bamboo.task.TaskResultBuilder com.atlassian.bamboo.task.TaskResultBuilder.create(com.atlassian.bamboo.task.TaskContext)'
at com.atlassian.bamboo.plugins.cppunit.CppUnitTask.execute(CppUnitTask.java:26) ~[?:?]
at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:321) ~[atlassian-bamboo-core-10.2.4.jar:?]
Cause
This error occurs because the app was built against an older version of the Bamboo API and is incompatible with the current Bamboo Data Center version.
Solution
Build a new .jar file from this repository, which contains the updated dependencies.
Or download this bamboo-cppunit-plugin-2.0_2025-06-11T15:36:34.543Z.jar.
Stop Bamboo.
Uninstall the previous app (bamboo-cppunit-plugin-1.1.jar) from <bamboo-home>\shared\plugins.
Place the new bamboo-cppunit-plugin-2.0.jar in the <bamboo-home>\shared\plugins.
Start Bamboo and run the build again.
Was this helpful?