title: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
body: <p>I am facing problems when i run my project on eclipse on apache tomcat server as i am spring as a framework, I added the necessary jars The error is:
  Could please any one let me know what could be the issue ?</p>
  
  <pre><code>  May 13, 2017 1:10:43 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\jdk1.8.0_111\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.8.0_111/bin/../jre/bin/client;C:/Program Files/Java/jdk1.8.0_111/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_111/bin/../jre/lib/i386;D:\apache-maven-3.5.0\bin;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Program Files\Git\cmd;D:\apache-maven-3.5.0\bin;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Users\Abhishek\Desktop\eclipse;;.
  May 13, 2017 1:10:43 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:my-app' did not find a matching property.
  May 13, 2017 1:10:43 PM org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on http-8181
  May 13, 2017 1:10:43 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 609 ms
  May 13, 2017 1:10:43 PM org.apache.catalina.core.StandardService start
  INFO: Starting service Catalina
  May 13, 2017 1:10:43 PM org.apache.catalina.core.StandardEngine start
  INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
  May 13, 2017 1:10:43 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
  INFO: validateJarFile(D:\WorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\my-app\WEB-INF\lib\javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
  May 13, 2017 1:10:43 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
  java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
  at java.lang.ClassLoader.findBootstrapClass(Native Method)
  at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1015)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1595)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149)
  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
  at org.apache.catalina.core.StandardService.start(StandardService.java:525)
  at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  
  May 13, 2017 1:10:43 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Skipped installing application listeners due to previous error(s)
  May 13, 2017 1:10:43 PM org.apache.catalina.core.StandardContext start
  SEVERE: Error listenerStart
  May 13, 2017 1:10:43 PM org.apache.catalina.core.StandardContext start
  SEVERE: Context [/my-app] startup failed due to previous errors
  May 13, 2017 1:10:44 PM org.apache.coyote.http11.Http11Protocol start
  INFO: Starting Coyote HTTP/1.1 on http-8181
  May 13, 2017 1:10:44 PM org.apache.jk.common.ChannelSocket init
  INFO: JK: ajp13 listening on /0.0.0.0:8009
  May 13, 2017 1:10:44 PM org.apache.jk.server.JkMain start
  INFO: Jk running ID=0 time=0/21  config=null
  May 13, 2017 1:10:44 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 479 ms
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
           http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
      &lt;display-name&gt;my-app&lt;/display-name&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/spring-servlet.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
      &lt;listener&gt;
          &lt;listener-class&gt; org.springframework.web.context.ContextLoaderListener &lt;/listener-class&gt;
      &lt;/listener&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>spring-servlet.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans  
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
    http://www.springframework.org/schema/context  
    http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://www.springframework.org/schema/mvc
  http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"&gt;
  
      &lt;!-- telling container to take care of annotations stuff --&gt;
      &lt;context:annotation-config /&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;!-- declaring base package --&gt;
      &lt;context:component-scan base-package="com.Controller" /&gt;
  
      &lt;bean id="messageSource"
          class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
          &lt;property name="basename" value="/WEB-INF/message" /&gt;
          &lt;property name="cacheSeconds" value="3000" /&gt;
      &lt;/bean&gt;
  
      &lt;!-- adding view resolver to show jsp's on browser --&gt;
      &lt;bean id="viewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="loginDao" class="com.DaoImpl.LoginDaoImpl" /&gt;
      &lt;bean id="loginService" class="com.serviceImpl.LoginServiceImpl" /&gt;
      &lt;bean id="loginVal" class="com.Bean.LoginValidation" /&gt;
  
      &lt;bean id="signUpDao" class="com.DaoImpl.SignUpDaoImpl " /&gt;
      &lt;bean id="signUpService" class="com.serviceImpl.SignUpServiceImpl " /&gt;
  
      &lt;bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="oracle.jdbc.OracleDriver" /&gt;
          &lt;property name="url" value="jdbc:oracle:thin:@localhost:1521/XE" /&gt;
          &lt;property name="username" value="hr" /&gt;
          &lt;property name="password" value="xxxxx" /&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;  
  </code></pre>