I suppose you've got into the binary compatibility issues somewhere. Two plugins may depend on different versions of a same library. If they do not use shading, there is a risk of such collisions in method signatures.
четверг, 16 июля 2015 г., 16:09:42 UTC+3 пользователь Ivo Bellin Salarin написал: > > 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 > > In my plugin I reference Artifactory plugin 2.3.1 and a lot of other > plugins. A full dependency tree is available in the gist ( > https://gist.github.com/nilleb/c08c0c11e0b74a98a694). > > 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)? > -- 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/704e71ed-7c58-4542-a555-5d23d7642608%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
