Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-06 Thread Mark H. Wood
On Wed, May 05, 2010 at 08:31:33AM -0500, Caldarale, Charles R wrote: As always, don't put Context elements in server.xml. The above got you double deployment of the foo webapp, once as foo, once as the default. Why do people invite problems when it's so easy to do things properly? Maybe

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-06 Thread Caldarale, Charles R
From: Mark H. Wood [mailto:mw...@iupui.edu] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Maybe because the documentation doesn't say it's improper; The current documentation for Context states (in bold): For Tomcat 6, unlike

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Pid
On 05/05/2010 02:24, Caldarale, Charles R wrote: From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Scenario 1: log4j.jar is in Tomcat/lib directory log4j.jar is NOT in WEB-INF/lib

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Mark Eggers
...@gmail.com Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, May 4, 2010, 4:55 PM This thread has grown too long. For anyone following this thread, here's the summary: Two

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread André Warnier
That was a nice and concise write-up, well-worth of an article in the Tomcat FAQ/WIKI. How to setup Tomcat with 3 virtual hosts, each with its own homepage and Manager (and other) applications, and its own logfiles. My only minor remark : Mark Eggers wrote: ... Finally for my setup, I added

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Nuno Faria
I was having a similar problem moving a Tomcat 5.5 configuration to 6.0. Following this thread and reading the docs I created virtual hosts using the same webapps dir (it is a development environment with CVS and I would have to change many things to accomplish one webapp folder per virtual

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Caldarale, Charles R
From: Mark Eggers [mailto:its_toas...@yahoo.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Note that I do not have any non-Tomcat jar in apache-tomcat-6.0.26 besides JDBC jars at this point. Which I suspect is key to solving

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Caldarale, Charles R
From: Nuno Faria [mailto:nuno.m.fa...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Following this thread and reading the docs I created virtual hosts using the same webapps dir That's a really, really bad idea

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Caldarale, Charles R
From: Mark Eggers [mailto:its_toas...@yahoo.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory I just hacked together a quick example on Windows/XP Professional. That was a nice and concise write-up, well-worth of an article

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-05 Thread Joe Hansen
Mark, Chuck, Andre, and Charles, You guys rock! Mark, I followed your recommendations and 1. I copied the virtual host webapps directories outside Tomcat. c:/hosts/abc.local/webapps c:/hosts/xyz.local/webapps 2. Copied the manager.xml to Tomcat/conf/Catalina/abc.local and

Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Hey all, We are using Tomcat 6 on a Windows XP box. We have a web application named abc. It was initially in the c:\Tomcat\webapps directory. I then moved the c:\Tomcat\webapps\abc directory to c:\Tomcat\abc. I then changed the Tomcat/conf/server.xml file to reflect this change... Host

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Mark Thomas
On 04/05/2010 17:32, Joe Hansen wrote: Hey all, We are using Tomcat 6 on a Windows XP box. We have a web application named abc. It was initially in the c:\Tomcat\webapps directory. I then moved the c:\Tomcat\webapps\abc directory to c:\Tomcat\abc. I then changed the Tomcat/conf/server.xml

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Thank you for the super quick reply Mark! We are using Java Spring. The reason for moving the web application out of the webapps directory was that the Spring Context Loader was loading twice. First because its in the webapps directory. Secondly, because it is being referred to by the Host entry

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Mark Thomas
On 04/05/2010 17:43, Joe Hansen wrote: Thank you for the super quick reply Mark! We are using Java Spring. The reason for moving the web application out of the webapps directory was that the Spring Context Loader was loading twice. First because its in the webapps directory. Secondly, because

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Mark, Here's the server.xml before moving abc out of the webapps directory: ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener /

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Mark Thomas
On 04/05/2010 17:59, Joe Hansen wrote: Mark, Here's the server.xml before moving abc out of the webapps directory: Host name=abc.local appBase=webapps/abc unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Host name=localhost appBase=webapps /Host Host name=abc.local appBase=webapps/abc First problem: overlapping

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Thanks for the reply, Mark. You made me understand the mess I have created. I have written two web applications abc and xyz. I have mapped abc.local and xyz.local to my machine's IP Address in my Windows HOST file. So when I visit http://abc.local, I would want the abc web application to be

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Looks like I have some reading to do! Will post back after I read some Tomcat documentation. Start here: http://tomcat.apache.org

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
: From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Looks like I have some reading to do! Will post back after I read some Tomcat documentation. Start here: http://tomcat.apache.org

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread André Warnier
Joe Hansen wrote: Many Thanks for the link Chuck! Here's what I did. 1. Created a directory named c:\Tomcat\abc\ROOT. 2. Moved the previous contents of c:\Tomcat\webapps\abc to c:\Tomcat\abc\ROOT directory. ... Let me throw in my grain of salt. I like things organised in a logical way, with a

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joe, On 5/4/2010 1:26 PM, Joe Hansen wrote: I have written two web applications abc and xyz. I have mapped abc.local and xyz.local to my machine's IP Address in my Windows HOST file. So when I visit http://abc.local, I would want the abc web

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory You want this: webapps/abc webapps/abc/ROOT -- this is your abc webapp webapps/abc/ROOT/META-INF webapps/abc/ROOT

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Thanks Andre and Chuck. Andre, I renamed Tomcat/abc/ to Tomcat/webapps-abc/ to keep the naming consistent. The directory structure that you've advocated is exactly the same as the one Chuck told me. And I have implemented that. However, logging is still an issue. One webapp's log4j seems to

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/4/2010 4:08 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory You want

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Pid
advise! Thank you! Joe On Tue, May 4, 2010 at 11:30 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Looks like I have some

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory However, logging is still an issue. One webapp's log4j seems to stomp over other webapp's log files. What could I be doing wrong? Where

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
: From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory However, logging is still an issue. One webapp's log4j seems to stomp over other webapp's log files. What could I be doing wrong? Where

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Initially I placed log4j-1.2.15.jar in the c:\Tomcat\lib directory only. This resulted in abc webapp logging in the c:\Tomcat\logs

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Chuck, There are common classes in Tomcat/lib/ but they don't attempt to do any logging. However, the abc Spring Web application does initialize a Quartz object which runs once every hour and does some logging. I don't know if that has any implications. Thanks, Joe Here's the stack trace from

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joe, On 5/4/2010 1:59 PM, Joe Hansen wrote: 2. But the web application logging is working wierdly.The log entries are written to c:\Tomcat\logs\xyz.log (i.e. the xyz web application's log) instead of writing to c:\Tomcat\logs\abc.log. . Here's

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joe, On 5/4/2010 6:15 PM, Joe Hansen wrote: There are common classes in Tomcat/lib/ but they don't attempt to do any logging. Are you sure? However, the abc Spring Web application does initialize a Quartz object which runs once every hour and

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
Thanks for the reply, Charles! When commons-logging.jar is present in Tomcat/lib and WEB-INF/lib directories, I get the following error : Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. Here's the complete stack

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Oh, I forgot to mention in my other message: you should put log4j.log into your webapp's WEB-INF/lib directory Presumably

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory When commons-logging.jar is present in Tomcat/lib and WEB-INF/lib directories, I get the following error : As you should. As Chris

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
/2009/09/02/log4j-multiple-web-apps-common-lib-logging/ But that doesn't solve my issue. Thanks, Joe On Tue, May 4, 2010 at 4:58 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread André Warnier
Joe Hansen wrote: Chuck, please note that when commons-logging.jar is present only in the WEB-INF/lib directory, I get the following error: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory So, either I get a) Invalid class loader hierarchy. You have more than one version

Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Joe Hansen
This thread has grown too long. For anyone following this thread, here's the summary: Two web applications, each with a Virtual Host entry in server.xml file. Tomcat/webapps-abc Tomcat/webapps-xyz These two web applications have different log4j.properties files. These log4j property files log to

RE: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory

2010-05-04 Thread Caldarale, Charles R
From: Joe Hansen [mailto:joe.hansen...@gmail.com] Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory Scenario 1: log4j.jar is in Tomcat/lib directory log4j.jar is NOT in WEB-INF/lib directories Have you added *anything* else