Re: How to debug Error: listenerStart?
On Sat, Apr 4, 2009 at 9:08 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: I think I figured out what's going on. Tomcat 5.5 uses an unmodified LogFactory from commons-logging, which pokes around for logging mechanisms - and finds your log4j.jar inside your webapp. Tomcat 6.0, on the other hand, uses a modified LogFactory, which is hard-coded to use an enhanced version of java.util.logging, so it never looks for your log4j. Looks like Tomcat 6 implements what you're looking for, so you might want to consider moving up. I just confirmed this behavior on Tomcat 6.0.18 - my production apps work the way I expected - I always get a stack trace when I break the app, and it never gets re-routed to my apps webapp. Your explanation makes sense. I'll update the bug I reopened. I've been needing a good reason to upgrade to 6 anyway, now I have one :) I'm also still looking into a (possibly?) related issue that I have where log4j in every webapp deployed beyond the first fails to auto-configure. Unfortunately, I still have something fishy going on here, even in Tomcat 6.0.18. It is different than it was under 5.5, but still undesirable. Now, log4j doesn't self configure for any of my webapps. But strangely, only two of them print log4j:WARN messages about log4j not being configured, while under Tomcat 5.5, all of my apps after the first printed that message. I'll have to do some more investigation there... but I may put that on hold until after I finish merging tomcat 6 into our official build process. Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/2/2009 3:03 PM, Caldarale, Charles R wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? my webapp dynamically configures log4j with a pattern like this: LogManager.resetConfiguration(); PropertyConfigurator.configure(properties); I think that's too late - the logger needs to be ready first thing so that webapp-related log entries can be created during deployment. In my webapp, I have a listener defined first that does this: public class Log4jListener implements ServletContextListener { private Logger logger; public void contextInitialized(ServletContextEvent e) { // Trigger loading of the log4j.properties file from the classpath. new PropertyConfigurator(); logger = Logger.getLogger(this.getClass()); logger.info(Log4j initialized); } public void contextDestroyed(ServletContextEvent e) { if(LogManager.class.getClassLoader() .equals(this.getClass().getClassLoader())) { logger.info(Log4j was loaded by application classloader; shutting down.); LogManager.shutdown(); } else { logger.info(Log4j was loaded by some other ClassLoader; not shutting down.); } } } This appears to load my configuration correctly, but I don't see any Tomcat messages in my log4j.log file. It's possible that Tomcat doesn't make much to say, though. I find messages like this in catalina.out after a successful startup: AbandonedObjectPool is used (org.apache.tomcat.dbcp.dbcp.abandonedobjectp...@46fd13) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 30 I am using a Context-configured DataSource, which I might have predicted would log to the app-configured logger, but it doesn't: it logs to stdout. INFO: Deploying web application archive ap.war log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. Those are indications that usage of the logger has already commenced. Yup, and it's probably commons-digester that triggered the configuration of log4j. What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? Create a log4j.xml or log4j.properties file in WEB-INF/classes. +1 - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknacMkACgkQ9CaO5/Lv0PATNACfUP6cNs6hxsvpmWIF053WK/tM M7AAnR+xzc8vD1UOBFlhvQs41y8M3I9j =1KZj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? In my webapp, I have a listener defined first that does this: code snipped This appears to load my configuration correctly, but I don't see any Tomcat messages in my log4j.log file. What version of Tomcat? We have determined that 6.0 does not interact in any way with a webapp's log4j usage, but 5.5 does. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/6/2009 5:45 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? In my webapp, I have a listener defined first that does this: code snipped This appears to load my configuration correctly, but I don't see any Tomcat messages in my log4j.log file. What version of Tomcat? We have determined that 6.0 does not interact in any way with a webapp's log4j usage, but 5.5 does. 5.5.26 - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknaeHYACgkQ9CaO5/Lv0PBWegCgrU82wi1z4a7ZdCKgSVywViC0 MikAoIYr1cMQbF+IreV0/KBupfDdl7pr =9IcY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
=proxyflags !-- check proxy parameters. -- condition property=useproxy equals arg1=${proxy.use} arg2=on / /condition /target target name=setproxy depends=proxyflags if=useproxy taskdef name=setproxy classname=org.apache.tools.ant.taskdefs.optional.net.SetProxy / setproxy proxyhost=${proxy.host} proxyport=${proxy.port} proxyuser=${proxy.user} proxypassword=${proxy.password} / echo message=Using ${proxy.host}:${proxy.port} to download ${sourcefile}/ /target target name=testexist echo message=Testing for ${destfile}/ available file=${destfile} property=exist/ /target target name=downloadfile unless=exist depends=setproxy,testexist !-- Download extract the file -- mkdir dir=${destdir} / get src=${sourcefile} dest=${destfile} / /target /project --end extras.xml (which has no log4j.references) -- 4. Replace $CATALINA_HOME/bin/tomcat-juli.jar with output/extras/tomcat-juli.jar. --where is output/extras/tomcat-juli.jar in apache-tomcat-6.0.14.zip it is in bin only? 5. Place output/extras/tomcat-juli-adapters.jar in $CATALINA_HOME/lib. --where is output/extras/tomcat-juli.jar in apache-tomcat-6.0.14.zip it is in bin only? 6. Start Tomcat --no effect log4j is not started.. ? Martin __ Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. From: chuck.caldar...@unisys.com To: users@tomcat.apache.org Date: Sat, 4 Apr 2009 21:08:55 -0500 Subject: RE: How to debug Error: listenerStart? From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Perhaps it is behaving different on Tomcat 6. I didn't try 6, only the latest 5.5, since that's what I'm using in production. Sorry, I didn't realize this was only a 5.5 issue. I did try it again on 5.5.27, and verified your findings. Also, your stack trace is showing that it was indeed, logged by tomcat's loggers. Did you try renaming the log4j.properties.hidden file that I provided? Just tried it again on 6.0.18 with the unhidden log4j.properties, and there was no difference. Also, with the original, untouched a.war, there were no messages about log4j initialization problems. So under 6.0, it appears that Tomcat is *not* trying to use your log4j. I contend that it should never be printed by log4j, since that is within the webapp which is failing - and tomcat can't know that log4j has been configured. But yet, on my system, that is exactly what is happening. I think I figured out what's going on. Tomcat 5.5 uses an unmodified LogFactory from commons-logging, which pokes around for logging mechanisms - and finds your log4j.jar inside your webapp. Tomcat 6.0, on the other hand, uses a modified LogFactory, which is hard-coded to use an enhanced version of java.util.logging, so it never looks for your log4j. Looks like Tomcat 6 implements what you're looking for, so you might want to consider moving up. I'm also still looking into a (possibly?) related issue that I have where log4j in every webapp deployed beyond the first fails to auto-configure. I suspect it is related. Since commons-logging is loaded by the system classloader, I'm wondering if it may be hanging onto data from the first log4j.properties it finds (since there's no global log4j) rather than looking for one for each webapp. Again, this doesn't appear to be an issue in 6.0. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Rediscover Hotmail®: Get quick friend updates right in your inbox. http
RE: How to debug Error: listenerStart?
From: Martin Gainty [mailto:mgai...@hotmail.com] Subject: RE: How to debug Error: listenerStart? log4j errors when porting a 5.5 webapp to 6.x: output/build/webapp/docs/logging.html None of your post is relevant to the topic under discussion. The instructions for using log4j here: http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j are appropriate when you want *Tomcat* to use log4j internally, not when using log4j inside a webapp, which is all the OP is trying to do. If you want to discuss using log4j for Tomcat's own logging, start a new thread. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Fri, Apr 3, 2009 at 8:32 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R Subject: RE: How to debug Error: listenerStart? To close out this thread Or maybe not. I've reopened bug https://issues.apache.org/bugzilla/show_bug.cgi?id=34110 and attached a war file which demonstrates the problem. I downloaded your a.war file into my Tomcat 6.0.18 installation on my Vista 64 box, and got the following in localhost.2009-04-03.log: Perhaps it is behaving different on Tomcat 6. I didn't try 6, only the latest 5.5, since that's what I'm using in production. Also, your stack trace is showing that it was indeed, logged by tomcat's loggers. Did you try renaming the log4j.properties.hidden file that I provided? Does it still log the stack trace to Tomcat's logger at that point, or does it log it to the log4j logger? (The output will look different if it was formatted by log4j) I contend that it should never be printed by log4j, since that is within the webapp which is failing - and tomcat can't know that log4j has been configured. But yet, on my system, that is exactly what is happening. Note that the above appeared in the logs *only* after shutting down Tomcat, since something is buffering the log entries and preventing them from being written to the file system promptly. I am doing a proper shutdown of Tomcat - so anything that isn't flushed yet should be flushed during shutdown. I'll check with tomcat 6 on Monday and see if it behaves differently. I'm also still looking into a (possibly?) related issue that I have where log4j in every webapp deployed beyond the first fails to auto-configure. But I haven't yet figured out how to reproduce the issue that I'm seeing in our large production apps in a small demo app. Remy's answer isn't going to be pretty... Oh well. I'm not concerned about the company I'd be keeping if I (once again) get to join the masses of tomcat users that have had bugs and surprisingly bad behavior declared non-bugs and perfectly normal behavior by Remy. Thanks for your help with this issue. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Perhaps it is behaving different on Tomcat 6. I didn't try 6, only the latest 5.5, since that's what I'm using in production. Sorry, I didn't realize this was only a 5.5 issue. I did try it again on 5.5.27, and verified your findings. Also, your stack trace is showing that it was indeed, logged by tomcat's loggers. Did you try renaming the log4j.properties.hidden file that I provided? Just tried it again on 6.0.18 with the unhidden log4j.properties, and there was no difference. Also, with the original, untouched a.war, there were no messages about log4j initialization problems. So under 6.0, it appears that Tomcat is *not* trying to use your log4j. I contend that it should never be printed by log4j, since that is within the webapp which is failing - and tomcat can't know that log4j has been configured. But yet, on my system, that is exactly what is happening. I think I figured out what's going on. Tomcat 5.5 uses an unmodified LogFactory from commons-logging, which pokes around for logging mechanisms - and finds your log4j.jar inside your webapp. Tomcat 6.0, on the other hand, uses a modified LogFactory, which is hard-coded to use an enhanced version of java.util.logging, so it never looks for your log4j. Looks like Tomcat 6 implements what you're looking for, so you might want to consider moving up. I'm also still looking into a (possibly?) related issue that I have where log4j in every webapp deployed beyond the first fails to auto-configure. I suspect it is related. Since commons-logging is loaded by the system classloader, I'm wondering if it may be hanging onto data from the first log4j.properties it finds (since there's no global log4j) rather than looking for one for each webapp. Again, this doesn't appear to be an issue in 6.0. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Caldarale, Charles R wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Many Tomcat components associated with a specific webapp will use the webapp's logger. If your log4j initialization fails (which appeared to be the case), there may well be no where to put the messages. You can try removing the log4j usage from your webapp (probably too hard), or correct its initialization so that it is available. This is a bit, but not entirely, off-topic. I suspect that I am going to attract (again) a lot of flak for writing this, but I will say (again) that I think the whole current concept of Tomcat logging has a problem, as a number of recent postings to this list (and many non-recent) demonstrate (again). Being able to specify, at the webapp level, which logging system it uses is great from an application developers point of view, but a nightmare from a system integrator's or administrator's point of view. The point being that if one has a until-now working Tomcat server, logging where and how the sysadmin decided it should, so that for example it would be possible to implement some system-wide technique to deal with accumulating logfiles, archive them, watch them.., and then comes this new webapp delivered as a war-file. It gets deployed, and starts logging wherever and however it pretty well pleases. Or not, depending on whether its own setup misses something. I believe that there should at least exist, at the very top Tomcat level, some configuration option that could say now, whatever all these geeks have defined in their applications in terms of logging, I want to collect all that output /here/, and no exceptions please. In the principle, that is the same kind of thing as Tomcat's (or Java's) security manager : it is possible at the top configuration level to block applications from accessing what they should not, and give them rights selectively to whatever is legitimate. I don't think that the current logging implementation allows this, or am I missing something again ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
To close out this thread, I've reopened bug https://issues.apache.org/bugzilla/show_bug.cgi?id=34110 and attached a war file which demonstrates the problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Caldarale, Charles R Subject: RE: How to debug Error: listenerStart? To close out this thread Or maybe not. I've reopened bug https://issues.apache.org/bugzilla/show_bug.cgi?id=34110 and attached a war file which demonstrates the problem. I downloaded your a.war file into my Tomcat 6.0.18 installation on my Vista 64 box, and got the following in localhost.2009-04-03.log: Apr 3, 2009 8:20:32 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class zz java.lang.ClassNotFoundException: zz at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Apr 3, 2009 8:20:32 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Note that the above appeared in the logs *only* after shutting down Tomcat, since something is buffering the log entries and preventing them from being written to the file system promptly. Remy's answer isn't going to be pretty... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/1/2009 6:02 PM, Caldarale, Charles R wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Yup, although Chuck's example is a missing filter, not a missing listener. The code is right here, in StandardContext.listenerStart: try { Class clazz = loader.loadClass(listeners[i]); results[i] = clazz.newInstance(); // Annotation processing if (!getIgnoreAnnotations()) { getAnnotationProcessor().processAnnotations(results[i]); getAnnotationProcessor().postConstruct(results[i]); } } catch (Throwable t) { getLogger().error (sm.getString(standardContext.applicationListener, listeners[i]), t); ok = false; } If the class wasn't found, it'll be logged here, and listenerStart returns false. Given the behavior of listenerStart, it could probably just propagate the exception instead of starting-up all the listeners, then failing to load the entire application. That would allow StandardContext.start() to give you a single error message /including/ a stack trace. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUw74ACgkQ9CaO5/Lv0PA7ywCfYowmHfUIqPm1SGzxosYfm+Es efoAoIHgujllFs9UXbr77pssHre+iJNU =743V -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Wed, Apr 1, 2009 at 5:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? It's simply your failure to look in the appropriate log file, rather than the console. - Chuck Actually, it's not. The stack trace is not present in _any_ log file that Tomcat is creating, in my instance of Tomcat. So, I seem to have a secondary problem that is messing up Tomcats logging configuration. Any idea what I should check, to figure out why I don't have a Host log file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Actually, it's not. Very odd. Sorry for the comment. Any idea what I should check, to figure out why I don't have a Host log file? Have you added Host elements to your server.xml? If so, you'll need to add the appropriate entries to logging.properties. Post your server.xml and logging.properties so we can take a look at them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Any idea what I should check, to figure out why I don't have a Host log file? Correction. I have a Host log file - but it is always blank. Size 0. I tried the starting it up with a missing filter, and a missing listener, and neither case gives me anything in the Host log file. I haven't made any changes to Tomcats default logging configuration. Tomcat does print this to the console as it starts up: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig). log4j:WARN Please initialize the log4j system properly. Perhaps thats related. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
How are you running Tomcat? IDEs (e.g. Eclipse) often reset the logging if you start Tomcat inside the IDE; For me, using the MyEclipse plugin in Eclipse completely suppresses everything but catalina.out. If I need the other logs, I start Tomcat from its ~bin/ startup.sh (I have a vanilla download from the Apache site). On Apr 2, 2009, at 10:09 AM, Dan Armbrust wrote: On Wed, Apr 1, 2009 at 5:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? It's simply your failure to look in the appropriate log file, rather than the console. - Chuck Actually, it's not. The stack trace is not present in _any_ log file that Tomcat is creating, in my instance of Tomcat. So, I seem to have a secondary problem that is messing up Tomcats logging configuration. Any idea what I should check, to figure out why I don't have a Host log file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/2/2009 10:03 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 I trust error messages more than I trust posters' assertions: SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUy5IACgkQ9CaO5/Lv0PBr1wCgwAaxTFA2kdk/l/58NSJlpjrN YhIAoLmqGuITlHOdZCSaU1/sCefG37Wt =VVf3 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 4/2/2009 10:21 AM, Dan Armbrust wrote: I haven't made any changes to Tomcats default logging configuration. Tomcat does print this to the console as it starts up: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig). log4j:WARN Please initialize the log4j system properly. This indicates that you /have/ made changes to Tomcat's default logging configuration. Tomcat doesn't use log4j by default. Do you have log4j*.jar in server/lib or common/lib? If so, try moving it out of the way and bouncing Tomcat. Tomcat should use its standard logging configuration if log4j is not present. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknUzHEACgkQ9CaO5/Lv0PAlmACfR8tOjRWnVV8WAWmrIvyBP7ha 24wAnRvmgfWT1YRF7QIhBxa/ErunfhDe =1Tno -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Here is the non-commented out bits of my server.xml: ?xml version=1.0 encoding=UTF-8? Server port=8005 shutdown=SHUTDOWN !--Listener className=org.apache.catalina.core.AprLifecycleListener /-- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server My logging.properties file is exactly what came with tomcat 5.5.25. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Dan Armbrust wrote: [...] Actually, it's not. The stack trace is not present in _any_ log file that Tomcat is creating, in my instance of Tomcat. So, I seem to have a secondary problem that is messing up Tomcats logging configuration. Any idea what I should check, to figure out why I don't have a Host log file? Sorry, no. The mysteries related to Tomcat logging are only disclosed to 1st-class Tomcat Gurus and System Packaging High-Priests. They are not disclosed to us mere mortals. ;-) This being said, you may want to have a look at how your Tomcat is being started (meaning the startup script(s)), and see if they haven't done some high-level redirection of STDOUT/STDERR to SYSLOG or something. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig). log4j:WARN Please initialize the log4j system properly. This indicates that you /have/ made changes to Tomcat's default logging configuration. Tomcat doesn't use log4j by default. Do you have log4j*.jar in server/lib or common/lib? If so, try moving it out of the way and bouncing Tomcat. Tomcat should use its standard logging configuration if log4j is not present. Hmm. I don't know how. I have a documented, rigid set of steps that I go through after downloading a new version of Tomcat. The only changes that I make to tomcat are: Add sample modjk2 scripts. Remove example apps. Remove Host manager. Replace Root application. comment out the AprLifecycleListener from server.xml Add activation.jar and mail.jar to the common/lib folder. (This is due to a packaging issue in one of our webapps that I haven't had a chance to fix yet) And thats it. There is no log4j present in tomcat's library folders. Log4j _is_ present in the war files that I deploy, however. I guess maybe I should walk through this step by step, and see _when_ tomcat gets confused about which logging system to use. Though I have a hunch that it has something to do with activation.jar or mail.jar. I've never liked the fact that I've been putting those in Tomcat's library folder. I'll start there, I guess. Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: How to debug Error: listenerStart? SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. The OP has just posted a second retraction... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? My logging.properties file is exactly what came with tomcat 5.5.25. What are you using on the command line to start Tomcat? In particular, what is the value of the following system properties? java.util.logging.manager java.util.logging.config.file The default values are org.apache.juli.ClassLoaderLogManager and ${catalina.base}/conf/logging.properties, respectively. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Add sample modjk2 scripts. The mod_jk2 package was deprecated many years ago; you should not be using it. Log4j _is_ present in the war files that I deploy, however. The log4j message may be coming from the webapp, not Tomcat. Look at the system properties of your running Tomcat to see what logging mechanism it thinks it's using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 I trust error messages more than I trust posters' assertions: SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. Well, it turned out I had some of both. Sorry if I caused confusion. One of my webapps was missing a listener, and one was missing both a listener and a filter, due to a packaging issue in my build scripts. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 4/2/2009 11:02 AM, Dan Armbrust wrote: Yup, although Chuck's example is a missing filter, not a missing listener. The OP's original problem *was* a missing filter: http://marc.info/?l=tomcat-userm=123862274508212w=2 I trust error messages more than I trust posters' assertions: SEVERE: Error listenerStart That's definitely a listener that won't start, not a filter. Well, it turned out I had some of both. Sorry if I caused confusion. No problem. Chuck and I are just trying to decide who is righter :) One of my webapps was missing a listener, and one was missing both a listener and a filter, due to a packaging issue in my build scripts. This can definitely cause confusion. I think we can find a solution for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknU1s8ACgkQ9CaO5/Lv0PAspQCfUXFNJDgP0BI4BK75p+zRIBeg p5YAoKyZGGjXvdemNdnBEH/KUzNUEXF+ =jgGK -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
What are you using on the command line to start Tomcat? In particular, what is the value of the following system properties? java.util.logging.manager java.util.logging.config.file The default values are org.apache.juli.ClassLoaderLogManager and ${catalina.base}/conf/logging.properties, respectively. - Chuck I'm using the catalina.sh script that comes with tomcat, with the following modifications. I set JRE_HOME to the path of the JRE that I want tomcat to use. I set JAVA_OPTS with a bunch of memory / garbage collector options. Both of these variables are hard coded into the top of the catalina.sh script. The rest is untouched from stock. I added an echo to the catalina.sh script to print the JAVA_OPTS that is actually using: -server -Xss250k -Xms1200m -Xmx1200m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/foo/tomcat/bin/../../nn/log -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/foo/tomcat/conf/logging.properties The logging properties appear to match what you expect. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Both of these variables are hard coded into the top of the catalina.sh script. The rest is untouched from stock. As a side note, you can do this with a separate setenv.sh script to avoid modifying the released scripts. The logging properties appear to match what you expect. Agreed. Are you shutting down Tomcat gracefully before looking at the log file? At some point fairly recently, the log entries stopped making it to the file system until the process was terminated, whereas they used to appear pretty much immediately (at least on my Windows boxes; I don't have any active Linux projects at the moment). I don't know what changed (I suspect the JRE - haven't taken the time to go hunting), but it makes it difficult to monitor a running Tomcat. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
I got a brand new copy of tomcat 5.5.25, and tested it. Some of the provided apps, such as balancer - create entries in the localhost log file. I used kdiff to compare the entire tomcat folder hierarchy to my tomcat distribution, and I can't find any significant difference that could cause my missing logs. I tried adding a missing listener to the balancer app. The error was properly logged. I tried deploying my war file (with a purposely broken listener) to the newly extracted, completely stock tomcat, and I see the same behaviour. No entries whatsoever in the localhost log file from my application, which failed to deploy. So, it would appear that something in my application - where I use log4j - is perhaps preventing the error from being logged by tomcat. What would be doing this? Something in my app is preventing this severe error from being passed up to tomcat to be logged - but then my app doesn't log it either - probably because it is stopped before it ever finishes deploying. There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Thu, Apr 2, 2009 at 7:30 PM, Dan Armbrust daniel.armbrust.l...@gmail.com wrote: What would be doing this? Something in my app is preventing this severe error from being passed up to tomcat to be logged - but then my app doesn't log it either - probably because it is stopped before it ever finishes deploying. Your app can't logg /before/ being deployed - that's Tomcat's responsibility. There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. - Check out if you find a file like log4j.properties or log4j.xml within your Tomcat-subdirectories (not within you webapps!) and rename it - Check for a file named log4j*.jar and rename it - Check for a file logging.properties within your Tomcat-subdirectories (not within you webapps!) and rename it - Replace the renamed file logging.properties with one from a clean Tomcat-installation - Restart Tomcat Now if there's an error with the deployment, you should find that within Tomcat's logs. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Many Tomcat components associated with a specific webapp will use the webapp's logger. If your log4j initialization fails (which appeared to be the case), there may well be no where to put the messages. You can try removing the log4j usage from your webapp (probably too hard), or correct its initialization so that it is available. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
On Thu, Apr 2, 2009 at 1:00 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? There is obviously some interaction going on between my webapp and tomcat's logging system that I don't know about. Many Tomcat components associated with a specific webapp will use the webapp's logger. If your log4j initialization fails (which appeared to be the case), there may well be no where to put the messages. You can try removing the log4j usage from your webapp (probably too hard), or correct its initialization so that it is available. - Chuck I don't know if my log4j initialization is failing, or if there is just a gap in time where tomcat sees that my webapp is using log4j - but my webapp has not yet had a chance to init log4j - my webapp dynamically configures log4j with a pattern like this: LogManager.resetConfiguration(); PropertyConfigurator.configure(properties); fairly early in it's startup sequence. But, when I get a listenerStart error, I know that this code hasn't yet executed (due to a missing system.out message) This also seems to fit with that other warning I get during the startup: INFO: Deploying web application archive ap.war log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. logPath: /opt/NetProvision/nn/log/ The 4th line, above, is printed when my log4j sequence completes. So it would appear that something within my webapp tried to log using log4j, but log4j wasn't yet configured - hence the warning about the missing appender. What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? I'll have to hunt through all of my 3rd party jar files... I wonder if one of them has a log4j config file that is being picked up. Thanks for all the feedback. I'm a whole lot closer to the real source of this problem than I was when I started tracking it down. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? my webapp dynamically configures log4j with a pattern like this: LogManager.resetConfiguration(); PropertyConfigurator.configure(properties); I think that's too late - the logger needs to be ready first thing so that webapp-related log entries can be created during deployment. INFO: Deploying web application archive ap.war log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. Those are indications that usage of the logger has already commenced. So it would appear that something within my webapp tried to log using log4j I suspect it was Tomcat code using your logger, not your webapp code. What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? Create a log4j.xml or log4j.properties file in WEB-INF/classes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
What would I need to do to make log4j within my webapp have a temporary configuration which would log to the console until the point when my webapp executes it's dynamic configuration? Create a log4j.xml or log4j.properties file in WEB-INF/classes. Bingo. That makes my log4j warnings go away, and now I get the stack traces when the startup fails due to munged listener or filter. Thanks! It's certainly not obvious to me why Tomcat is trying to use log4j from my webapp to log an error about a class missing from my webapp which prevents deployment. It seems like failures during deployment of a webapp should always be routed back to tomcat's logging system. Judging from what I found online when I first started hunting this down, I'm not the first person that has had this happen, either. Time to go fix all my build scripts to introduce a temporary log4j configuration to handle the time span before my real configuration can occur. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 4/1/2009 4:16 PM, Dan Armbrust wrote: I have a filter somewhere in a webapp that has gotten broken through my own packaging process, likely due to a missing class. Are you sure it's a filter and not a listener? SEVERE: Error listenerStart If you can't get any information in the log files, try removing everything from your web.xml and then re-adding each listener individually. At least that will narrow down which listener is failing. You could also wrap all your listener init code in try/catch blocks and log any errors yourself. You could also modify logging.properties and crank-up the logging level (though SEVERE seems like something that should already be logged... and it IS being logged: just not with a stack trace). What version of Tomcat are you using? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknT17AACgkQ9CaO5/Lv0PBldQCff0xwbqRhPjAcaAxvkNFSScMT 6CsAn1OVktwI2lUYZFWzwaajNmjPDux6 =mb4i -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to debug Error: listenerStart?
Ok, I've finally tracked down my specific problem. When a filter is declared in the web.xml file: filter filter-namerequestCounter/filter-name filter-classcom.foo.bar.FancyFilter/filter-class /filter And the class com.foo.bar.FancyFilter is missing from the war file that you deploy, Tomcat 5.5.25 prints this to the console: INFO: Deploying web application archive foo.war Apr 1, 2009 1:53:45 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Apr 1, 2009 1:53:45 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/foo] startup failed due to previous errors Which is really not very helpful in tracking down the problem. I've also seen this issue when the class path issue is much more obscure than simply missing the class of a filter. Why doesn't tomcat log a stack trace, so we can see what class is missing? It's certainly not doing anyone any favors by not logging the cause of a SEVERE error. Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? Thanks, Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: Re: How to debug Error: listenerStart? Why doesn't tomcat log a stack trace It does, in the log associated with the Host of interest: Apr 1, 2009 4:58:44 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter Path Mapped Filter java.lang.ClassNotFoundException: filters.ExampleFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? It's simply your failure to look in the appropriate log file, rather than the console. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to debug Error: listenerStart?
From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Subject: RE: How to debug Error: listenerStart? Any thoughts on if this is a bug, a specific problem with my tomcat installation, or a design decision that I don't agree with? If you really do want to see all log message pertaining to your webapp on the console, add this to conf/logging.properties: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo].handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler Change the logging level to whatever you need, and the app name (/foo, above) to the app of interest. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org