On Wed, Jul 15, 2020 at 7:42 AM Michael Carter
<[email protected]> wrote:
> java.lang.NoSuchMethodError: 
> com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
>  at 
> org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:90)
>  …
>
> Not sure what I did to cause the problem

Somehow pulled in an incompatible version of `guava`. Jenkins bundles
11.x, and without a lot of advanced acrobatics¹ you cannot override
this. If your plugin bundles some third-party libraries, they may be
depending on a newer version of Guava and Maven picks that version for
tests, breaking everything. Check

mvn dependency:tree

and use an `<exclusion>` as necessary. Unless the third-party library
actually _requires_ newer Guava features, in which case you have
problems.


Also, did your tests stop working with no code changes? If `master`
was blue/green until now, check whether your `Jenkinsfile` is using,
say,

buildPlugin(configurations: recommendedConfigurations())

which is nondeterministic. If tests broke inside a PR (I would
recommend a PR for all nontrivial changes, even if you are a sole
maintainer, just for trackability and CI), link to that from any post
to the mailing list.


¹Read: 
https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/#pluginfirstclassloader-and-its-discontents

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1SG%3D%2BuPiiT3LURfW88oSBZU%3D3X09YCLi6ia4XwFuED3A%40mail.gmail.com.

Reply via email to