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

  • Home
  • SEARCH
  • 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 3273426
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:55:50+00:00 2026-05-17T18:55:50+00:00

I am trying to deploy a war that i didnt write and i am

  • 0

I am trying to deploy a war that i didnt write and i am getting this error in my logs:

java.lang.NoClassDefFoundError: HttpSessionListener

i know that HttpSessionListener lives in servlet-api.jar which is found in the lib dir of tomcat(my app server).

I tried including servlet-api.jar in the war’s WEB-INF/lib folder, but the logs yelled at me for doing that:

INFO: validateJarFile(/home/test/apache-tomcat-6.0.18/webapps/test/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

the internets claim that you dont have to include that class in your lib folder.

edit:
i removed the offending listener (which was causing the problem above) from web.xml because it didnt look very important. this revealed more errors:

java.lang.Error: Unresolved compilation problem: 
    The type javax.servlet.FilterChain cannot be resolved. It is indirectly referenced from required .class files

what am i missing?

  • 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. Editorial Team
    Editorial Team
    2026-05-17T18:55:51+00:00Added an answer on May 17, 2026 at 6:55 pm

    @BalusC’s explanation sounds more plausible than mine …

    Some other possible explanations / things to check:

    1. The servlet-api.jar is not in $CATALINA_HOME/lib, or for some reason doesn’t contain the class. (I know you said you “know” it’s there, but you didn’t specifically say you checked it.)

    2. Something else is broken which caused the first attempted load of HttpSessionListener to fail with an uncaught exception during static initialization. (This is kind of implausible, since HttpSessionListener is an interface. But it is worth checking the logs for earlier class loading errors … just in case.)

    3. The missing class might be named foo.bar.HttpSessionListener rather than javax.servlet.http.HttpSessionListener. This is likely to show up in the nested stack trace.

    4. If something in the WAR you are deploying is creating its own classloader, it is possible that is is doing this incorrectly and the HttpSessionListener class is not on the classloader’s effective classpath.

    EDIT

    If you are now seeing unresolved compilation errors reported in the logs, you should be suspecting the WAR file and the process used to build it. Specifically, it sounds like the WAR includes classes that had Java compilation errors!

    (Or maybe this is a problem compiling JSPs … but that would show up in the logs too.)

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

Sidebar

Related Questions

I'm trying to deploy elmah . For inexplicable reasons, I'm getting an error: .axd
I'm trying to deploy to a slicehost slice using this config/deploy/production.rb file. I'm clueless
When I created the project I'm trying to deploy I selected that I wanted
So, I am trying to deploy a Web Application feature that updates the web.config
Hi I am trying to deploy an application using webstart. I have a requirement
I seemed to get the following exception when trying to deploy my application: Caused
In IIS 6, I am trying to deploy a Web Site project from Visual
Im using Eclipse 3.4, EclipseMe 1.7.9. Im trying to deploy/create package a simple project
Trying to get my css / C# functions to look like this: body {
UPDATE: This problem goes away when I deploy as an exploded EAR i.e. by

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.