title: LinkageError with Jenkins on WebLogic
body: <p>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).</p>
  
  <p>I get the following stacktrace which seems to indicate some problem with the tokenmacro plugin.</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Questions:</p>
  
  <ol>
  <li>Based on my understanding of this trace, the problem is that there are conflicting copies of the Multimaps class that have been loaded? Is that right?</li>
  <li>Why would there be multiple classloaders (AntClassLoader2 and AppClassLoader) involved? Shouldn't it be the case that, once a classloader finds the required class, it simply "returns" that class, and it delegates classloading to parent classloaders only when it does not find the class?</li>
  <li>Why does my setup work in JBoss but not in WebLogic?</li>
  <li>What can be done to resolve this problem? I have tried placing Guava 11 in the WEB-INF of the tokenmacro plugin directory, but it doesn't help. I've also tried the same with Guava 13.</li>
  </ol>
  
  <p>Additional information that might be of use:</p>
  
  <ul>
  <li>Token Macro Plugin version installed is 1.10</li>
  <li>Email Extension Plugin version installed is 2.40.5</li>
  <li>In my jenkins.war, I have a weblogic.xml file where wls:prefer-web-inf-classes is set to true.</li>
  </ul>