Found the solution. This is for all those posters who will run into
this tomcat bug(well, at least, I consider this a bug). Basically,
somehow, I had a log4j jar in my WEB-INF/lib folder. This would cause
logging to work in some places and not others. It would sometimes work
going to java.util.logging and sometimes would not depending on the
siutation. Here is a posted example of it not working....
https://pro40.abac.com/deanhiller/cgi-bin/moin.cgi/Downloads
Just unzip and copy to webapps directory and notice not much information
on why your servlet did not start!!!!! Erase the log4j jar and get
plenty of information.
Keywords for google
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Error listenerStart tomcat logging not working
Dean Hiller wrote:
Okay, a zip file with one *.java file and one *.class file can be
found here...
https://pro40.abac.com/deanhiller/cgi-bin/moin.cgi/Downloads
You can unzip it and copy the folder to tomcat/webapps and watch no
Exception get logged. Just the " Error listenerStart" message gets
logged an no more information is there. Google has 953 references to
"Error listenerStart" and many of them are "what went wrong with my
app" as there is no stack trace. I haven't found any posts answering
those questions though.
thanks,
dean
Filip Hanik - Dev Lists wrote:
ok, that was fairly easy, the error gets logged to the
<TOMCAT_HOME>/logs/localhost.2006-03-29.log" this is on the default
install, no loggers modified
so are you still having a problem?
Mar 29, 2006 9:12:47 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Mar 29, 2006 9:12:47 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 29, 2006 9:12:47 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener
instance of class listeners.ContextListener
java.lang.RuntimeException: sdadasda
at
listeners.ContextListener.contextInitialized(ContextListener.java:114)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Mar 29, 2006 9:12:47 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 29, 2006 9:12:47 AM org.apache.catalina.core.ApplicationContext log
Dean Hiller wrote:
thanks for the link. I need that too. Regardless of logging
thought, quickly add this to any serlvetlistener
public void contextInitialized(ServletContextEvent evt) {
throw new RuntimeException("asdfsf");
}
Run it, and enjoy not being able to know what the heck went wrong
with your app like I have seen many have done on the posts already.
ie. Tomcat used to log the stack trace, but in 5.5 does not, and
that should be high enough warning level that config of logs don't
matter.
Making the problem even harder.....
On a second note, I have fooled around with logging and it works
fine in my app, and I could configure it and such(with 5.5) and my
logging.properties file in WEB-INF. I could never get my
servletlistener to log any statements(making the problem doubly hard).
thanks,
dean
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]