I have Jenkins 1.613 running on WebLogic 12c, and also on JBoss EAP 6.3. I have managed to get the Jenkins email-ext plugin working on JBoss. However, whenever I use tokens such as $PROJECT_NAME, the email-ext plugin fails on WebLogic (works perfectly fine on JBoss, I should emphasise again).
I get the following stacktrace which seems to indicate some problem with the 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;"
the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, org/jenkinsci/plugins/tokenmacro/Tokenizer,
and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, com/google/common/collect/Multimaps,
have different Class objects for the type ap; com/google/common/base/Supplier;) com/google/common/collect/ListMultimap; used in signature
at org.jenkinsci.plugins.tokenmacro.Tokenizer.find(Tokenizer.java:109)
at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:167)
at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:233)
at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:71)
at hudson.plugins.emailext.ExtendedEmailPublisher.setSubject(ExtendedEmailPublisher.java:659)
Questions:
Additional information that might be of use:
1.) I would assume the same.
2.a (multiple classloaders): There are special classloaders in application containers like JBoss. They serve to separate classes in different applications. You should be able to use any version of a class in your application independant of the version used in a different application.
Therefore two classes are considered different if they have the same name but different classloaders.
Problems arise where two applications get "in contact" or where classes are provided by the container. I would guess that the problem is around Guava being provided by WebLogic.
Additionally, Jenkins is a kind of application container itself, it must separate different plugins, therefore the AntClassLoader2.
2b (Classloader delegation): Usually it's just the other way round: always ask the parent classloader, if it cannot find the class, try to find it yourself. But the whole story is much more complex (to get an idea see https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html, maybe there is some similar documentation for WebLogic, too).
3) As a first guess I would check if WebLogic (as your instance is configured) provides Guava.
4) I would try to isolate the problem and make it reproducable writing a small webapp that uses Supplier. Maybe I would search and read documentation about how classloading is handled in WebLogic.
I am able to test the email ext tempate but not able to send.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With