Hi I am using DBForms 2.5 with Tomcat 5.5.9 (including the Tomcat compat libraries to ensure Java 1.4.2 compliancy).
I use log4j as logging framework for all my java applications, as well as for my java web applications - so does DBForms fortunatly too. When I deploy some of my non-DBForms web applications to Tomcat through the Tomcat manager it works fine. Previously when I deployed DBForms web applications to Tomcat, deployment failed, but I managed to get that solved by placing log4j.properties in tomcat\common\classes and log4j<version>.jar and commons-loggin<version>.jar in \tomcat\common\lib according to the official Tomcat 5.5/Log4j 1.2.x doc at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html The problem I am facing at the moment is that when Tomcat starts, the classloader gets Tomcat's logging going using Log4j (due to the above hacks), but when it reaches the point of loading org.dbforms.servlets.ConfigServlet, the ConfigServlet reads parameter log4j.configuration for web.xml and executes: Properties log4jProperties = new Properties(); log4jProperties.load(fis); LogManager.resetConfiguration(); PropertyConfigurator.configure(log4jProperties); At this point Tomcat logging reports: log4j:WARN No appenders could be found for logger (org.apache.catalina.loader.WebappClassLoader). log4j:WARN Please initialize the log4j system properly. Tomcat continues successfully, but it's logging has crashed. Logging for the DBForms web application works though, so it looks like Tomcat is not too fond of Log4j being initiated twice. I was wondering if upcomming versions of DBForms could conform to Tomcat's supported way of using log4j inside the web app simply by having a log4j.properties in WEB-INF/classes folder, instead of resetting logging in org.dbforms.servlets.ConfigServlet as it works at the moment ? For DBForms it would require: 1. Removing the following from web.xml: <init-param> <param-name>log4j.configuration</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </init-param> 2. Having log4j.properties in WEB-INF/classes instead of WEB-INF 3. And in org.dbforms.servlets.ConfigServlet don't activate logging as it's done atm Is this a possible scenario, or am I missing something ? Is it a simpler way to do it ? -- best regards Audun ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ DbForms Mailing List http://www.wap-force.net/dbforms