title: How can I get around this invalid classloader hierarchy?
body: <p>I run iPlanet's Java application server, something in it is loading <code>commons-logging-1.0.4.jar</code>.</p>
  
  <p>That's fine until one of my applications calls <code>AuthSSLProtocolSocketFactory</code> which is another apache library that also uses <code>commons-logging</code>.</p>
  
  <p>I put the jar on the jvm classpath and get this error:</p>
  
  <blockquote>
    <p><code>Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
    (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy....</code></p>
  </blockquote>
  
  <p>It seems that <code>commons-logger</code> doesn't like having two instances of itself loaded in different classloaders. I assume the application server has its own classloader that's loading it the first time (Although I can't find any appserver configuration that mentions it) so when my application goes to load it a second time it throws that exception.</p>
  
  <p>I can't change the web server, and I can't change the apache library. Suggestions?</p>