Deprecated Garbage Collections – Kenny Lee Chee Wei

Debuging java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener in Eclipse, tomcat, maven

with 7 comments

If you’re developing a spring-enabled web application using the combination of Eclipse, Tomcat and Maven. You might encounter the following error when you try to start tomcat within eclipse.

Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(

You’ll need to configure your eclipse project settings by:

  1. Right click on the project in eclipse on the left panel under the package explorer view.
  2. Click Java EE Module Dependencies.
  3. Check (make sure the checkbox is ticked) the Maven Dependencies option (the last option).

Written by kennii

January 28, 2010 at 2:41 am

Posted in Spring Framework

7 Responses

Subscribe to comments with RSS.

  1. Thanks, this really helped me! The error message didn’t really give that much information about the cause of the problem.


    February 17, 2010 at 8:19 am

  2. Thanks SO much for posting this. I have been going crazy trying to figure out whether my dependencies were wrong, or what!


    February 25, 2010 at 7:41 pm

  3. I owe you a lunch!
    Thanks a bunch for the info.


    May 21, 2010 at 12:58 pm

  4. Thanks for this tip. It was valuable


    June 20, 2010 at 7:36 pm

  5. Hello there,

    I too get the same error, but when I try to follow your steps, there is no “Java EE Module Dependencies” under project properties. How do I proceed now?! I’m using Eclipse Helios for Java EE with Maven and Tomcat running from within Eclipse. Please help!



    October 13, 2010 at 9:11 pm

  6. 2 trupi

    Java EE Module Dependencies is replaced by Web Deployment Assembly


    October 19, 2010 at 3:36 pm

  7. I have the same error. I am using JBoss and Eclipse Juno. I dont have any of “Java EE Module Dependencies” or “Web Deployment Assembly”


    November 9, 2012 at 1:34 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: