I run iPlanet's Java application server, something in it is loading
That's fine until one of my applications calls
AuthSSLProtocolSocketFactory which is another apache library that also uses
I put the jar on the jvm classpath and get this error:
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....
It seems that
commons-logger 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.
I can't change the web server, and I can't change the apache library. Suggestions?
Apache mod rewrite simple redirect
APC not recommended for production?
Redirect Apache to Tomcat - IllegalStateException when navigating in the app
That's not the recommended way to load jars in J2EE apps..
How can I prevent cross-site request forgery with Perl and Apache?
The easiest thing is to just let the Apache library use the commons logging jar that comes with iPlanet.
How do I use mod_perl2 and Apache Bucket Brigades?
Don't put commons-logging.jar in your WEB-INF/lib dir or in any classpath setting and the iPlanet one should be picked up automatically..
Open Microsoft Word in Java
Slow Client connection blocks Mongrel
Handling web requests on server side
This will then load everything in your applications classloader before looking at the parent.
This should resolve this kind of problem, assuming your have a similar setting.
. This does mean that you will have to supply all the dependencies in your own application (which is the best practice anyway)..