Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 167617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:18:26+00:00 2026-05-11T12:18:26+00:00

In my Tomcat logs (catalina) I am getting the following error preventing my application

  • 0

In my Tomcat logs (catalina) I am getting the following error preventing my application from starting up:

 SEVERE: Error listenerStart 24-Mar-2009 13:23:10 org.apache.catalina.core.StandardContext start SEVERE: Context [/exampleA] startup failed due to previous errors 

I do not know why I am getting this. In my web.xml I have the following

<listener>     <listener-class>         uk.co.a.listener.SessionListener     </listener-class> </listener>  <listener>     <listener-class>         uk.co.a.listener.SessionAttributeListener     </listener-class> </listener> 

When I comment out the listeners it starts up fine. The code for the listners are below:

public class SessionAttributeListener implements HttpSessionAttributeListener {     static Log log = LogFactory.getLog(SessionAttributeListener.class.getName());      public void attributeAdded(HttpSessionBindingEvent hsbe) {         log.debug('VALUE attributeAdded to THE SESSION:' + hsbe.getName());     }      public void attributeRemoved(HttpSessionBindingEvent hsbe) {         log.debug('VALUE attributeRemoved from THE SESSION:' + hsbe.getName());     }      public void attributeReplaced(HttpSessionBindingEvent hsbe) {         log.debug('VALUE attributeReplaced in THE SESSION:' + hsbe.getName());     } } 

and

public class SessionListener implements HttpSessionListener {      static Log log = LogFactory.getLog(SessionListener.class.getName());      private static int activeSessions = 0;     public void sessionCreated(HttpSessionEvent evt)     {         activeSessions++;         log.debug('No. of active sessions on:'+                 new java.util.Date()+' : '+activeSessions);     }     public void sessionDestroyed (HttpSessionEvent evt)     {         activeSessions--;     } }  

Why is this not starting? Or where can I look for more information?

UPDATE

There only seems to be a problem with SessionAttributeListener from starting up. The SessionListener was not starting up because the <listener> were declared after the <servlet>

UPDATE

There was a problem with the JAR file used. The class for SessionAttributeListener was not included. When it was included the application started.

UPDATE

The AttributeListener does not seem to be running. When it is used the code fails. Is there a simple way to check if a listener is running?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:18:26+00:00Added an answer on May 11, 2026 at 12:18 pm

    re your update reading ‘The AttributeListener does not seem to be running. When it is used the code fails. Is there a simple way to check if a listener is running?’ have you tried adding a static initialiser? something like

    static { log.debug('static initialiser called'); } 

    that way the first time that the class is referenced you should get a log record.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file which contain following lines: /logs/tc0001/tomcat/tomcat7.1/conf/catalina.properties:app.env.server.name = demo.example.com /logs/tc0001/tomcat/tomcat7.2/conf/catalina.properties:app.env.server.name = quest.example.com
When I deploy my war file in tomcat, the SEVERE errors thrown by Catalina
For a Java EE app, I'm getting a SocketException in the logs from time
Adding log4j [1] in tomcat 6.0.x forces tomcat to produce logs in catalina file.
While running my tomcat the following error is coming . The BASEDIR environment variable
I am getting a ClassCastException for org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter In the logs I see that my
I am getting the following error while setting up the load balancer with two
I'm getting this error when I try to run tomcat: "java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\apache-tomcat-7.0.34\bin\tcnative-1.dll:
I'm using Tomcat 6 with eclipse web tools to publish an application. When I
My catalina logs are filling up with gobs of statements like: /logs/catalina.out:2010-05-05 02:57:19,611 [Thread-19]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.