0

I have seen numerous posts with the same issue in SO. But the solutions provided in those posts does not help resolve my issue.

I have created a webapp and trying to run the same in tomcat server. When I try to run the project, I get HTTP Status 404, and the following error in tomcat console:

Jan 27, 2014 6:02:40 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in   production environments was not found on the java.library.path: C:\Program   Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program  Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows \System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_10\bin;.
Jan 27, 2014 6:02:40 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:EmployeeServices' did not find a matching property.
Jan 27, 2014 6:02:40 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:BataMeServices' did not find a matching property.
Jan 27, 2014 6:02:40 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 27, 2014 6:02:40 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 27, 2014 6:02:40 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 535 ms
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
Jan 27, 2014 6:02:40 PM 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:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
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)

Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/EmployeeServices] startup failed due to previous errors
Jan 27, 2014 6:02:41 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO:  validateJarFile(D:\ielect_sw\ws_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tm p1\wtpwebapps\BataMeServices\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet  Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Jan 27, 2014 6:02:43 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
log4j:ERROR setFile(null,true) call failed.

I have added all the jar dependencies for spring correctly. Any help resolving the above issue is well appreciated.

5
  • 1
    Check whether you have servlet.jar in your dependencies and all spring jars Commented Jan 27, 2014 at 12:50
  • 1
    Follow this link mkyong.com/spring/… Commented Jan 27, 2014 at 12:51
  • @ShoaibChikate - I have all the required spring jar's(including servlet.jar) in my classpath. Also, I have gone through the link you gave, prior to posting this here. Commented Jan 27, 2014 at 12:56
  • i guess there is 2 servlet jars Bcz manually u d have added and also by default Tomcat used to have also check whether jars has class Commented Jan 27, 2014 at 13:15
  • servlet-api-3.0-alpha-1, servlet-api jar's I have added already Commented Jan 27, 2014 at 13:23

1 Answer 1

2

I just answered the same question here: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener in eclipse

The fix was explained here: http://commonexceptions.blogspot.com/2014/01/java.html.

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

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.