Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 29171 invoked from network); 6 Aug 2010 14:58:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Aug 2010 14:58:52 -0000 Received: (qmail 84152 invoked by uid 500); 6 Aug 2010 14:58:51 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 84008 invoked by uid 500); 6 Aug 2010 14:58:50 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 84000 invoked by uid 99); 6 Aug 2010 14:58:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 14:58:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [12.160.87.73] (HELO mx1.nexweb.org) (12.160.87.73) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 14:58:40 +0000 Received: from msw1.nexweb.us ([164.226.177.54]) by mx1.nexweb.org (8.14.1/8.14.1) with ESMTP id o76Ew3jl015199 for ; Fri, 6 Aug 2010 10:58:03 -0400 Received: from ngate1.nexweb.us (unverified [164.226.177.14]) by msw1.nexweb.us (Clearswift SMTPRS 5.2.5) with ESMTP id for ; Fri, 6 Aug 2010 10:57:43 -0400 To: user@commons.apache.org MIME-Version: 1.0 Subject: [Logging] : Logs not getting populated in log file X-KeepSent: 6A6AFE55:0D160B8A-85257777:004FCF3C; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5 SHF336 August 12, 2009 Message-ID: From: Jasmin Mehta Date: Fri, 6 Aug 2010 10:57:42 -0400 X-MIMETrack: Serialize by Router on NGATE1/HQ/NEXNET(Release 8.5|December 05, 2008) at 08/06/2010 10:57:43 AM, Serialize complete at 08/06/2010 10:57:43 AM Content-Type: multipart/alternative; boundary="=_alternative 0052321585257777_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 0052321585257777_= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I am using Oracle Application Server 10g Release 3 (10.1.3.5.0) for windows. Because of below bug in Oracle App Server After Upgrading from 10.1.3.1.0 the Application Fails with "java.lang.NoClassDefFoundError: org/apache/log4j/Category" [ID 460448.1] I am not importing the OC4J standard shared lib "apache.commons.logging version 1.0.4" But have created my own shared-lib along with others. The nex.apache.commons.logging has one jar file commons-logging-1.1.1.jar. In my ear file I have log4j-1.2.13.jar file. The log4j.properties is: log4j.rootCategory=DEBUG,stdout,standardFile log4j.configCheckDelay=900000 ################################## CONSOLE ######################################## log4j.appender.OJDL=oracle.core.ojdl.log4j.OracleAppender log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=[%d{dd MMM yyyy HH:mm:ss}] %-5p [%c{1}] %m%n log4j.defaultInitOverride=true ################################## STANDARD FILE ################################## log4j.appender.standardFile=org.apache.log4j.RollingFileAppender log4j.appender.standardFile.File=/u5/reteklogs/dev/VGCC/log/vgcc.log log4j.appender.standardFile.MaxFileSize=1000KB log4j.appender.standardFile.MaxBackupIndex=50 log4j.appender.standardFile.layout=org.apache.log4j.PatternLayout The Java class using apche commons logging has code: import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class CustomerFindAction extends CommonDispatchAction { private Log logger = LogFactory.getLog(this.getClass()); public ActionForward findCustomer(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { logger.info("Entered findCustomer()"); logger.debug("Testing apache commons"); ....... It does not print the logs on my log file vgcc.log. But the Java class where I am using logger instance from log4j, it does print: import org.apache.log4j.Logger; public class SessionCounter { private Logger logger = Logger.getLogger("SessionCounter"); public void addSession(HttpServletRequest request) throws ParseException, BusinessRuleException, CloneNotSupportedException { logger.info("Entered addSession"); logger.debug("testing log4j"); } .... But I really need to display logs via apache commons logging, because my application has several other libraries that uses apache commons. and I need to print logs from there. Thanks for your help. Jasmin ****************************************************************************** This email and any files transmitted with it are intended solely for the use of the individual or agency to whom they are addressed. If you have received this email in error please notify the Navy Exchange Service Command e-mail administrator. This footnote also confirms that this email message has been scanned for the presence of computer viruses. Thank You! ****************************************************************************** --=_alternative 0052321585257777_=--