Seems like a dumb question, but I've been hunting a bug in my web
application which seemed to be associated with commons-logging. Following
advice on the log4j boards, I went for a 'pure' log4j implementation,
replacing:-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
with
import org.apache.log4j.Logger;
.....
static Logger log = Logger.getLogger(StartLoginAction.class.getName());
...
log.info("logthis etc");
and using a log4j.properties file to initiate log4j (as before with
commons logging). I eliminated the commons-logging.properties file.
Everything worked fine and the commons-logging exception went away. My app
was stable for much longer ( 8 hours and several thousand test requests),
but now I have an unhandled exception ( a NullPointerException) when one
of my action Classes forwards an actionError in the request scope.
ie
return (mapping.findForward("start")); //(with an error)
Should I put the imports to commons.logging back? Can struts live without
the commons-logging.properties file? I know commons-logging.jar is
absolutely required. What is necessary for a 'pure' log4j implementation?
Thanks,
Iain Sanderson.