- TomEE+ 1.0.0;
- running app from within Eclipse, with TomEE configured as target server
After I turned on detailed logging of class loading (BTW - big thanks for the tip!) - I saw that the class loader that tried to load Log4J jars (as part of initializing Faces) was the Tomcat server one. I had log4j.1.2.5.jar in WEB-INF/lib dir already - but that classloader wasn't looking there, it looked into server libs. So placing log4j1.2.5.jar there solved it.
The million dollar question:
- Tomcat has, as part of its distribution, commons-logging.1.1.1.jar;
- that jar has class org.apache.commons.logging.impl.Log4JLogger, which (as we saw) has *dependency* on org.apache.log4j.Category;
- but Tomcat distribution has no jars with the Category class;
- so when Tomcat classloader attempts to load Log4JLogger - it is bound to fail (and it does).
Am I missing something?