java - LinkageError with Jenkins on WebLogic -


i have jenkins 1.613 running on weblogic 12c, , on jboss eap 6.3. have managed jenkins email-ext plugin working on jboss. however, whenever use tokens such $project_name, email-ext plugin fails on weblogic (works fine on jboss, should emphasise again).

i following stacktrace seems indicate problem tokenmacro plugin.

java.lang.linkageerror: loader constraint violation: when resolving method "com.google.common.collect.multimaps.newlistmultimap( java/util/map; com/google/common/base/supplier;) com/google/common/collect/listmultimap;"  class loader (instance of hudson/classicpluginstrategy$antclassloader2) of current class, org/jenkinsci/plugins/tokenmacro/tokenizer,  , class loader (instance of sun/misc/launcher$appclassloader) resolved class, com/google/common/collect/multimaps,  have different class objects type ap; com/google/common/base/supplier;) com/google/common/collect/listmultimap; used in signature  @ org.jenkinsci.plugins.tokenmacro.tokenizer.find(tokenizer.java:109) @ org.jenkinsci.plugins.tokenmacro.tokenmacro.expand(tokenmacro.java:167) @ org.jenkinsci.plugins.tokenmacro.tokenmacro.expandall(tokenmacro.java:233) @ hudson.plugins.emailext.plugins.contentbuilder.transformtext(contentbuilder.java:71) @ hudson.plugins.emailext.extendedemailpublisher.setsubject(extendedemailpublisher.java:659) 

questions:

  1. based on understanding of trace, problem there conflicting copies of multimaps class have been loaded? right?
  2. why there multiple classloaders (antclassloader2 , appclassloader) involved? shouldn't case that, once classloader finds required class, "returns" class, , delegates classloading parent classloaders when not find class?
  3. why setup work in jboss not in weblogic?
  4. what can done resolve problem? have tried placing guava 11 in web-inf of tokenmacro plugin directory, doesn't help. i've tried same guava 13.

additional information might of use:

  • token macro plugin version installed 1.10
  • email extension plugin version installed 2.40.5
  • in jenkins.war, have weblogic.xml file wls:prefer-web-inf-classes set true.

1.) assume same.

2.a (multiple classloaders): there special classloaders in application containers jboss. serve separate classes in different applications. should able use version of class in application independant of version used in different application.

therefore 2 classes considered different if have same name different classloaders.

problems arise 2 applications "in contact" or classes provided container. guess problem around guava being provided weblogic.

additionally, jenkins kind of application container itself, must separate different plugins, therefore antclassloader2.

2b (classloader delegation): it's other way round: ask parent classloader, if cannot find class, try find yourself. whole story more complex (to idea see https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html, maybe there similar documentation weblogic, too).

3) first guess check if weblogic (as instance configured) provides guava.

4) try isolate problem , make reproducable writing small webapp uses supplier. maybe search , read documentation how classloading handled in weblogic.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -