Phillip Qin wrote: > If I only use log4j, jar has to be placed in my app's WEB-INF/lib. Don't > know why it is in a different directory if commons-logging and log4j work > together.
Just because two libraries use each other's classes doesn't mean their classes (or jars) need to be in the same directory. They just need to locate each other's classes in the classpath. A web container places WEB-INF/classes and all the jars found in WEB-INF/lib into the classpath for the web application. I don't know for sure (I haven't researched the specs), but apparently these are supposed to be placed in the classpath prior to initializing the web application. JRun apparently has a bug where it does not put these in the classpath early enough, so when some components of Struts (or something else that depends on Log4J) initialize, they can't find the Log4J jar file, and hence the NoClassDefFoundError. It probably works for you to just put the Log4J jar into WEB-INF/lib under a different container, and I'd really like it to work this way for JRun as well, but it doesn't, so I need to put the Log4J jar and properties file into the shared server lib directory (jrun/servers/lib) for it to work. That is why it is in a different directory. Regards, Paul ----- Paul Hodgetts -- President, Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site & Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>