Sorry, I guess I was a bit vague. I wrote the JDBCPoolAppender class as an extended version of the JDBCAppender, just as it advises you to in the JavaDoc. All it does is replace the getConnection() function.
I then try and initialize the Appender in a DOM config file like so, ... <appender name="JDBC" class="net.sportplan.extra.util.JDBCPoolAppender"> <param name="driver" value="org.postgresql.Driver"/> ... having added the line to the ENV variables that tomcat starts with, CATALINA_OPTS="-Dlog4j.configuration=log4jdom.xml" but get an error message in catalina.out as described below, despite trying to put my JDBCPoolAppender everywhere I think Tomcat should find it. My question is just where I should put a class file so that Tomcat can find it? I think I must be doing something fundamentally wrong you see. cheers, caoilte On Sun, 2002-07-28 at 01:35, Martin Gainty wrote: Caolite: I could'nt locate JDBPoolAppender class. The closest I came was org.apache.log4j.jdbc Class JDBCAppender Could you give us a snapshot of the source so we can view the execution sequence. Thanks, Martin Gainty ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Laconia Data Systems (LDS) is proprietary to the company. It is confidential, legally privileged and protected by law. LDS does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of LDS. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. LDS can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. _______________________________________________ >From: Caoilte O'Connor >Reply-To: "Log4J Users List" >To: [EMAIL PROTECTED] >Subject: extending log4j in tomcat >Date: 27 Jul 2002 18:09:28 +0100 >MIME-Version: 1.0 >Received: from nagoya.betaversion.org ([192.18.49.131]) by hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Sat, 27 Jul 2002 10:17:04 -0700 >Received: (qmail 21880 invoked by uid 97); 27 Jul 2002 17:20:03 -0000 >Received: (qmail 21868 invoked by uid 98); 27 Jul 2002 17:20:02 -0000 >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm >Precedence: bulk >List-Unsubscribe: >List-Subscribe: >List-Help: >List-Post: >List-Id: "Log4J Users List" >Delivered-To: mailing list [EMAIL PROTECTED] >X-Antivirus: nagoya (v4198 created Apr 24 2002) >X-Mailer: Ximian Evolution 1.0.7 >Message-Id: <1027789769.819.25.camel@caryatin> >X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N >Return-Path: [EMAIL PROTECTED] >X-OriginalArrivalTime: 27 Jul 2002 17:17:04.0282 (UTC) FILETIME=[6D76AFA0:01C23591] > >Hi, > >I'm trying to extend a Log4j JDBCAppender and run it with my catalina >webapp, but log4j throws the following exception on initialization : > >log4j: Class name: [net.sportplan.extra.util.JDBCPoolAppender] >log4j:ERROR Could not create an Appender. Reported error follows. >java.lang.IllegalAccessException: >net.sportplan.extra.util.JDBCPoolAppender > at java.lang.Class.newInstance0(Native Method) > at java.lang.Class.newInstance(Class.java:237) > at >org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:164) > at >org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) > at >org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) > > at >org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415) > > at >org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:335) > at >org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:788) > at >org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:673) > at >org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616) > at >org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602) > at >org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:456) > at org.apache.log4j.LogManager.(LogManager.java:145) > at org.apache.log4j.Category.getInstance(Category.java:514) > at >org.apache.commons.logging.impl.Log4JCategoryLog.(Log4JCategoryLog.java:97) > at java.lang.reflect.Constructor.newInstance(Native Method) > at >org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:487) > at >org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:285) > at >org.apache.commons.logging.LogFactory.getLog(LogFactory.java:400) > at >org.apache.commons.digester.Digester.(Digester.java:309) > at >com.wintecinc.struts.validation.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:142) > > at >com.wintecinc.struts.validation.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:123) > > at >com.wintecinc.struts.action.ValidatorServlet.initMapping(ValidatorServlet.java:223) > at >com.wintecinc.struts.action.ValidatorServlet.init(ValidatorServlet.java:123) > at javax.servlet.GenericServlet.init(GenericServlet.java:258) > at >org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918) > at >org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810) > at >org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279) > at >org.apache.catalina.core.StandardContext.start(StandardContext.java:3421) > at >org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) > at >org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) > at >org.apache.catalina.core.StandardHost.install(StandardHost.java:738) > at >org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300) > at >org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) > at >org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) > at >org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155) > > at >org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) > at >org.apache.catalina.core.StandardHost.start(StandardHost.java:638) > at >org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) > at >org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) > at >org.apache.catalina.core.StandardService.start(StandardService.java:388) > at >org.apache.catalina.core.StandardServer.start(StandardServer.java:506) > at org.apache.catalina.startup.Catalina.start(Catalina.java:781) > at >org.apache.catalina.startup.Catalina.execute(Catalina.java:681) > at >org.apache.catalina.startup.Catalina.process(Catalina.java:179) > at java.lang.reflect.Method.invoke(Native Method) > at >org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) > > >I've tried putting the classes (and as packaged jars) everywhere I think >Log4j running under catalina should look, but it never seems to find >them. How did other people succeed in extending Log4j functionality >under tomcat? > >cheers, > >caoilte > > > > >-- >To unsubscribe, e-mail: >For additional commands, e-mail: ________________________________________________________________________ Chat with friends online, try MSN Messenger: Click Here -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>