TeamSite 6.5 SP1
Solaris 2.9
I have added some custom Java servlets, JSPs and business logic classes to interact with a TeamSite workflow CGI task. I attempted to use the apache commons logging framework as I see it is included in the content center web application library.
So we have code similar to the following in all our code:
private static final Log logger = LogFactory.getLog(className.class);
What ends up happening is that the framework doesn't find the log4j classes that are also in the web app's lib directory. I dumped out some debug messages and it seems like the log messages are falling through to the jdk standard logging, which in turn is getting dumped into servletd.log.
At a past client, we forced the java code to create log4j objects instead of commons logging. We ended up adding a log4j.xml file to the customer toolkit in etc/conf/customer. By doing that, what ended up happening was a bunch of messages thrown in the servletd.log saying that the log4j.xml file was invalid.
static Logger logger = Logger.getLogger(className.class.getName());
[html]
servletd.log:log4j:ERROR Parsing error on line 5 and column 36
servletd.log:log4j:ERROR Document root element "log4j:configuration", must match DOCTYPE root "null".
servletd.log:log4j:ERROR Parsing error on line 5 and column 36
servletd.log:log4j:ERROR Document is invalid: no grammar found.
[/html]
I wish this was documented in the UICG. I suppose I can file a feature request for that, but in the meantime, can anyone shed some light on best practices for this?