Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 47534 invoked from network); 10 Dec 2010 06:58:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Dec 2010 06:58:38 -0000 Received: (qmail 86994 invoked by uid 500); 10 Dec 2010 06:58:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 86950 invoked by uid 500); 10 Dec 2010 06:58:35 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 86939 invoked by uid 99); 10 Dec 2010 06:58:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 06:58:34 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.139.52.207] (HELO nm10.bullet.mail.ac4.yahoo.com) (98.139.52.207) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 10 Dec 2010 06:58:26 +0000 Received: from [98.139.52.193] by nm10.bullet.mail.ac4.yahoo.com with NNFMP; 10 Dec 2010 06:58:04 -0000 Received: from [98.139.52.142] by tm6.bullet.mail.ac4.yahoo.com with NNFMP; 10 Dec 2010 06:58:04 -0000 Received: from [127.0.0.1] by omp1025.mail.ac4.yahoo.com with NNFMP; 10 Dec 2010 06:58:04 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 143809.84744.bm@omp1025.mail.ac4.yahoo.com Received: (qmail 44779 invoked by uid 60001); 10 Dec 2010 06:58:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291964283; bh=+U/aPUzyWYt8MRdWchjFxu12jGlxcyZc8rR8VlCsdwU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=jC4xZB2KqW0rBERqfMIG3/9FkaKt2Sbbkk5kJnmT9oUVIkaOGkBoLX7IU0CyQa42OnbV0W+BXPfGUhrTMkYRWJWsWodzMQHAMKaY4kiuyKx6aJkJKLvmsnSL2vnpJ2C3W4WHU8cmG6G2SDyd2bJ+s4ui6D3eW+BUqg8KvqtsBC8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=z1wgrYLjnYew3XV+P2BLsn+CnxXXepa7sfskIckgHsi2rKI+Ts5vFtBjXBXige++rkF1NZjLMnKlGhw0UWjba1y8E3dBTBiIt1u3++6Gz9P9zh9KpOZYjLh11Pt7B9DmrvzOXy+CGclkXlTIVQvfwxAO5qEynPkgB59WVfejBLs=; Message-ID: <949444.40113.qm@web56606.mail.re3.yahoo.com> X-YMail-OSG: 2owH7FcVM1nc9K1PMYsnhZwvouaATicjyX5Go3KB96g_zVg SmDiTgTLS8vqy_ZtPxQJrwjo9SDqaP.nlP0sjXyPir6uul9hrDyr9qSMUfY3 m.IKVMHFMcrBAcx14dtETp6lef0_VAOHf733E0rFwRUjE_P5RFLDaQ7noCxF L7M1BUjYEbiP0mf7R52biKdhtog_09iYUHeqBnfIKF30KbaUsIvhiKvTszI8 VhIxzIWGgq3Qo.zh04qYsqWqi1i6VW3_mKvSbBBDq4FmGG35gbbEDPih3vzc trMmWFY8tvLaxNINMjQe2ubt926kxUmQunkWmBzb1tL7lZrOJ6JbeBT8xt1i atA2vTxVjCAMInvZaNCPKgyzfSRZgYtJNtbN0eX302dAmtXywNVGDjPp2EIl Y.oYCziJ.53E- Received: from [71.133.241.161] by web56606.mail.re3.yahoo.com via HTTP; Thu, 09 Dec 2010 22:58:03 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 References: <642383.27771.qm@web120704.mail.ne1.yahoo.com> <303820.96568.qm@web56605.mail.re3.yahoo.com> <403825.94739.qm@web120714.mail.ne1.yahoo.com> <4D0137EE.5090901@christopherschultz.net> <958941.61858.qm@web56607.mail.re3.yahoo.com> <4D014C13.4040104@christopherschultz.net> <333824.34672.qm@web120702.mail.ne1.yahoo.com> Date: Thu, 9 Dec 2010 22:58:03 -0800 (PST) From: Mark Eggers Subject: Re: deploy log4j To: Tomcat Users List In-Reply-To: <333824.34672.qm@web120702.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org Quick question: Are you running under a security manager in any environment? The logs (most likely catalina.out or catalina..log) will have lots of messages if you've not modified the default $CATALINA_HOME/conf/catalina.policy file. For example, if I run my simple application that has its first logging instance in a servlet under the security manager using the default catalina.policy, I get as the first line of the error: javax.servlet.ServletException: Error instantiating servlet class simple.controller.SimpleLog If you are doing your first logging in a ServletContextListener, your application will likely not start at all. The configuration can get complicated quickly. There should be a policy that allows the appropriate log4j class to read its configuration file. There should be another policy that allows the appropriate log4j class to read/write in the log directory as well as the appropriate log files. Maybe someone on the list has already written the appropriate catalina.policy lines. If you're not running using the security manager, then please disregard the noise. . . . . just my two cents. /mde/ ----- Original Message ---- From: cpanon To: Tomcat Users List Sent: Thu, December 9, 2010 6:43:39 PM Subject: Re: deploy log4j Hello I agree it should be simple and in the IDE it works fine. In simple production environment on Windows Servers it fails. In simple production environment on a WinXPP it works. It cant get any more discipline testing than that. Nothing changes other than the deployment OS. I am loading an applet and I can synthesize my location as codebase+"WEB-INF/classes/log4j.properties but even the working IDE environment fails. I am doing a prop.load(getClass().getResourceAsStream(codebase+"WEB-INF/classes/log4j.properties")). Now neither environment works. Ideas? ________________________________ From: Christopher Schultz To: Tomcat Users List Sent: Thu, December 9, 2010 4:37:23 PM Subject: Re: deploy log4j -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark, On 12/9/2010 3:44 PM, Mark Eggers wrote: > I didn't get any errors. Nor do we: we use log4j for application logging, have log4j.jar in WEB-INF/lib, have our log4j.properties in WEB-INF/classes/log4j.properties, and use the following code to configure our logging system: new PropertyConfigurator(); It couldn't be simpler than that if you ask me. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0BTBMACgkQ9CaO5/Lv0PBiZgCfY2ajcRb5kgt5ODC4/hx8UaBW 48kAoK0a1Dq/wxwSsXsVrjNWBJwo0IXc =eyxa -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org