Deprecated Garbage Collections – Kenny Lee Chee Wei

A truckload of garbage by Kenny Lee Chee Wei

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

with 9 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(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

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).
Advertisements

Written by kennii

January 28, 2010 at 2:41 am

Posted in Spring Framework

9 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.

    Pekka

    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!

    Jen

    February 25, 2010 at 7:41 pm

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

    Zack

    May 21, 2010 at 12:58 pm

  4. Thanks for this tip. It was valuable

    RK

    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!

    Thanks,
    Trupti

    trupti

    October 13, 2010 at 9:11 pm

  6. 2 trupi

    Java EE Module Dependencies is replaced by Web Deployment Assembly
    http://www.mkyong.com/eclipse/eclipse-java-ee-module-dependencies-is-replaced-by-web-deployment-assembly/

    Hollywood

    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”

    Pranav

    November 9, 2012 at 1:34 am

  8. Your style is so unique compared to other people I have read stuff from.
    Thank you for posting when you’ve got the opportunity, Guess I’ll just book mark this site.

    asp.net ecommerce

    May 22, 2013 at 7:14 pm

  9. i am not finding javaee option

    Vishnu Awasthi

    April 22, 2014 at 10:06 am


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: