So to start off - this problem is still theoretical. I haven't gotten around to actually
testing and debugging, etc. So I don't have any specific errors or complications to refer to yet... But here is the issue:
I have a web application that uses log4j, and as such, includes a log4j JAR file in its "WEB-INF/lib" folder.
I also have a JAR file that needs to be deployed in
Tomcat's "lib" folder because I need to make a JNDI resource available to ALL web applications installed.
However, the code in that common JAR file depends on log4j as well, requiring me to also place a log4j JAR in Tomcat's "lib" folder.
So the question: how do I make sure that the two log4j libraries don't conflict? Both will be loaded with different class loaders, but both will technically be available to my web application. Is it best practice to just configure logging at the Tomcat level and not at the individual web application level (ie, should I remove logging implementation and configuration from my web application in favor of a global configuration)?