0

I'm having this problem in starting web program even though there is no errors in my code. Here is the error code:

 org.apache.catalina.core.StandardContext listenerStart
 SEVERE: 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:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4909)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2

3 Answers 3

0

If you are creating simple project without maven, need to follow following steps,

  1. download required jar files, e.g. I am using spring 4 so I have downloaded files from Index of release

  2. Then add this files inside your WebContent/WEB-INF/lib folder.

  3. Add jar files in build path (In eclipse : Right click on project -> Properties -> Java Build Path -> Add JARs...)

This will avoid org.springframework.web.context.ContextLoaderListener exception.

Sign up to request clarification or add additional context in comments.

Comments

0

Check if all the required jars are added on your classpath. The one because of which you are getting this error is - spring-web-<your_spring_version>.jar.

In case you are using a dynamic web project,

  1. Add all the required jars to your WEB-INF\lib folder.
  2. Refresh, clean and build project again.

If you are using Maven to build your project, make sure you add the dependencies to deployment assembly after running a Maven build-

  1. Right click on project in Eclipse
  2. Click Properties
  3. Select Deployment Assembly and click Add
  4. On the following dialog box, select Java Build Path Entries, select all the jars and click Ok.

Comments

0

As per the error you have posted, I think some of required jar files are missing. In thia line

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

You can see that your application is unable to find the required class.So please make sure that you have included all the required jar files or if you are using mavan than check for the all required maven dependencies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.