title: How do you deploy EARs to Wildfly with Different JAR versions then Wildfly provides?
body: <p><em>Consider this use case:</em></p>
  
  <p>We deploy to Wildfly 8.2, which includes many dependencies implicitly including in the classloader  by the app server itself. Examples include things like HttpClient. To illustrate this in my example, we'll call this: <code>libaryX-v1.jar</code>.</p>
  
  <p>And we deploy multiple EARs to the same install, which are provided by multiple teams within our organization, which are on different release and budgetary cycles.</p>
  
  <p><code>TeamA.ear</code> needs <code>libraryX-v1.jar</code> and is fully tested and certified with that version.</p>
  
  <p><code>TeamB.ear</code> needs <code>libraryX-v2.jar</code>, in particular new features to meet this teams requirements that are not included in any other version.</p>
  
  <p>How do we deploy both of these EARs to Wildfly?</p>
  
  <p>If TeamA had the budget to test and get certified using <code>librayX-v2.jar</code>, then the obvious solution would be to upgrade that module within Wildfly.</p>
  
  <p>When we add <code>libraryX-v2.jar</code> to <code>TeamB.ear</code>, we get the following exception:</p>
  
  <pre><code>java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.Example.&lt;init&gt;(Lorg/whatever/sharedClass;)V" 
  the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, com/company/teamB/exampleService, and 
  the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class, org/apache/Example, 
  have different Class objects for the type org/whatever/sharedClass used in the signature
  </code></pre>