• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Meaning of error message in Catalina.out?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I start Tomcat, I get the following two error statements within cataline.out:

StandardContext[]: Error configuring application listener of class listeners.ContextListener: java.lang.ClassNotFoundException: listeners.ContextListener java.lang.ClassNotFoundException: listeners.ContextListener

Then it goes through a list of statements like:
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3155)
.
.
. etc.etc. through 18 statements like that (I presume its looking for the missing thing it can't find)

Then it prints the other error statement:
StandardContext[]: Error configuring application listener of class listeners.SessionListener: java.lang.ClassNotFoundException: listeners.SessionListener
java.lang.ClassNotFoundException: listeners.SessionListener

and another bunch of statements like:
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3155)
.
.
.
etc. etc.

Then finally it says that it skipped installing application listeners and that the context startup failed due to those errors.

Anyone know what those "application listeners" in the error statements are and possible reasons why why Tomcat might not be able to configure them? I can print out the whole Cataline.out file if anyone wants to see it.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a context listener entry in your web.xml?
If so, is it pointing to a valid class?
 
Jaime Lannister
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your suggestion. I have two web.xml files. One is in the Tomcat home directory in Tomcat4/conf/. This file was installed by the web host with Tomcat and has not been changed since to my knowlege. It does not have a listener entry.

The other one is in my site directory under /var/www/html/WEB-INF/. It is an example web.xml file that I copied into that directory and to which I added <servlet> references to the servlets I want to test. It does have listener entry:
<!-- Define example application events listeners -->
<listener>
<listener-class>listeners.ContextListener</listener-class>
</listener>
<listener>
<listener-class>listeners.SessionListener</listener-class>
</listener>

I'm looking into this further. I take it there should be a listener defined in the Tomcat directory web.xml too?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I take it there should be a listener defined in the Tomcat directory web.xml too?



No. What Ben's asking is whether the class exists, its file is valid and is in your classes directory.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This line
<listener-class>listeners.SessionListener</listener-class>
is telling Tomcat that you want to register a session listener and that the class for this listener is "listeners.SessionListener".

If no such class exists within your app, an exception will be thrown.
I would either remove or comment out the entire "listener" section from your web.xml file unless and until you have written a listener.

Also, I don't recomend altering the global web.xml file (the one in tomcat/conf) until you A) really know what you're doing and B) have a very valid reason for doing so. That deployment descriptor contains global settings for ALL the apps running under that instance of Tomcat.

If you do play with it, make a back up copy first.
[ August 15, 2005: Message edited by: Ben Souther ]
 
Jaime Lannister
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben and Ulf, your suggestions and explanations worked.
reply
    Bookmark Topic Watch Topic
  • New Topic