Hi,

I am trying to resolve an error caused by
the org.jenkins-ci.main:maven-plugin:3.25
and org.jenkins-ci.plugins:apache-httpcomponents-client-4-api when I try to
build a rest client. It fails with an ugly classloader error that I cannot
find a way to workaround. seems like there is a different version of
commons.logging, I clean up all the folders in my classpath, target, work,
... exclude common-logging in several places, force the version of
common-logging at top level. And nothing works. Has anyone found something
similar?

                    Caused by: java.lang.LinkageError: loader constraint
violation:
                    when resolving method 'void
org.apache.http.impl.auth.HttpAuthenticator.<init>(org.apache.commons.logging.Log)'

                    the class loader 'PluginClassLoader for
apache-httpcomponents-client-4-api' @2afafdfc of the current class,
                      org/apache/http/impl/nio/client/MainClientExec,
                    and the class loader
org.codehaus.plexus.classworlds.realm.ClassRealm @e4a177b 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
                    (
                        org.apache.http.impl.nio.client.MainClientExec is
in unnamed module of loader 'PluginClassLoader for
apache-httpcomponents-client-4-api' @2afafdfc,
                            parent loader 'dependency ClassLoader for
/home/me/src/opentelemetry-plugin/work/plugins/apache-httpcomponents-client-4-api.jpi'
@41c52988;

                        org.apache.http.impl.auth.HttpAuthenticator is in
unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm
@e4a177b,
                            parent loader 'bootstrap'
                    )


-- 
Regards
Iván Fernández Calvo

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAKo5QrpoA_Z3Gpi%3DBedwVR1BFrkGs_RRsekHMoCa6rDz5VsbyA%40mail.gmail.com.

Reply via email to