What Operating System are you using (both controller, and any agents involved in the problem)?
Docker image jenkins/jenkins:lts-centos7
Reproduction steps
docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts-centos7
Install suggested plugins on installation
Install Discord notifier 1.4.14
Create a clean Job with only the post build action
Results
Expected result:
Expected to send a notification to Discord
Actual result:
LinkageError
ERROR: Step ?Discord Notifier? aborted due to exception:
java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.impl.auth.HttpAuthenticator.<init>(Lorg/apache/commons/logging/Log;)V" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, org/apache/http/impl/nio/client/MainClientExec, and the class loader (instance of java/net/URLClassLoader) for the method's defining class, org/apache/http/impl/auth/HttpAuthenticator, have different Class objects for the type org/apache/commons/logging/Log used in the signature
at org.apache.http.impl.nio.client.MainClientExec.<init>(MainClientExec.java:111)
at org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:849)
at com.mashape.unirest.http.options.Options.refresh(Options.java:93)
at com.mashape.unirest.http.options.Options.<clinit>(Options.java:46)
at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:151)
at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:131)
at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)
at nz.co.jammehcow.jenkinsdiscord.DiscordWebhook.send(DiscordWebhook.java:208)
at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:293)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:187)
at hudson.model.Run.execute(Run.java:1953)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: SUCCESS
update
Sorry, it was the wrong Java version (8) inside the container. When updated to Java 11 it worked fine.
Version report
Jenkins and plugins versions report:
Reproduction steps
Results
Expected result: Expected to send a notification to Discord
Actual result: LinkageError
update
Sorry, it was the wrong Java version (8) inside the container. When updated to Java 11 it worked fine.