Lee Haslup wrote:
I'm building a web application using Java 1.4.2, Struts 1.1 and Tomcat 5.0.16 and I seem to be having a bit of a struggle with logging. I wonder of anyone has had experience with that combination and could give me a clue.
I'm not sure I've used that *exact* combination, but pretty close...
I've used Log4J in the past so that sounded ok but I seem to be having class loader problems with Tomcat when I try. When I attempt to do my own logging (putting the log4j jar file in my WEB-INF/lib directory and log4j.properties in my classpath) Tomcat throws an error -- LogConfigurationException: No suitable Log constructor.
I haven't seen that particular error message, and I routinely package log4j.jar into my WEB-INF/lib directory. You might try putting commons-logging.jar into WEB-INF/lib as well... The main struts servlet that loads up will try to initialize commons-logging, which will initialize log4j if it finds a log4j config file. Possibly some classloader confusion is creeping in if commons-logging.jar is scoped at a different level than log4j?
One difference in my setup, is I use log4j.xml to configure log4j, instead of the properties file format. Not sure if that actually makes any difference or not.
There is some useful info, and some useful links here: http://www.qos.ch/logging/thinkAgain.html that you might find useful as well. This document: http://jakarta.apache.org/struts/userGuide/building_controller.html#logging might be useful also, if you haven't already seen it...
TTYL,
Phil
-- Vote Badnarik for President 2004 www.badnarik.org
FREE AMERICA Vote Libertarian www.lp.org
_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
