Hi all,
I am experiencing the following error:
java.lang.LinkageError: loader constraint violation: when resolving method "org.jfrog.build.client.ArtifactoryHttpClient.upload(Lorg/apache/http/client/methods/HttpPut;Lorg/apache/http/HttpEntity;)Lorg/jfrog/build/client/ArtifactoryUploadResponse;" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, org/jenkinsci/plugins/greenproject/MyArtifactoryClient, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, org/jfrog/build/client/ArtifactoryHttpClient, have different Class objects for the type org/apache/http/client/methods/HttpPut used in the signature
The 'MyArtifactoryClient' class extends a class from the artifactory plugin, which composes an ArtifactoryHttpClient to complete its task.
If I'm not wrong, the exception stack above means that the HttpPut parameter that I'm passing from my class to the ArtifactoryHttpClient is not of the same type expected by the receiver. How's that possible?
I've tried to reference the same package (org.apache.httpcomponents) at the same version exposed by the artifactory plugin. But this hasn't improved the situation.
How can I solve this error? Is there any equivalent of the binding redirects in Java(hudson/ClassicPluginStrategy$AntClassLoader)?