title: SEVERE: Exception starting filter struts2
body: <p><img src="https://i.stack.imgur.com/JZyGI.jpg" alt="enter image description here">I am getting an error while starting my struts2 application. Following is the error I am getting:</p>
  
  <pre><code>2 Sep, 2012 12:17:31 AM 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\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Java\jre7\bin\client;C:\Program Files (x86)\Java\jre7\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\
  2 Sep, 2012 12:17:32 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:MateExpenseCalculator' did not find a matching property.
  2 Sep, 2012 12:17:33 AM org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on http-8080
  2 Sep, 2012 12:17:33 AM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 2364 ms
  2 Sep, 2012 12:17:33 AM org.apache.catalina.core.StandardService start
  INFO: Starting service Catalina
  2 Sep, 2012 12:17:33 AM org.apache.catalina.core.StandardEngine start
  INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
  2 Sep, 2012 12:17:33 AM org.apache.catalina.core.StandardContext filterStart
  SEVERE: Exception starting filter struts2
  java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269)
  at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
  at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:115)
  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
  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(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:289)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  2 Sep, 2012 12:17:33 AM org.apache.catalina.core.StandardContext start
  SEVERE: Error filterStart
  2 Sep, 2012 12:17:33 AM org.apache.catalina.core.StandardContext start
  SEVERE: Context [/MateExpenseCalculator] startup failed due to previous errors
  2 Sep, 2012 12:17:34 AM org.apache.coyote.http11.Http11Protocol start
  INFO: Starting Coyote HTTP/1.1 on http-8080
  2 Sep, 2012 12:17:34 AM org.apache.jk.common.ChannelSocket init
  INFO: JK: ajp13 listening on /0.0.0.0:8009
  2 Sep, 2012 12:17:34 AM org.apache.jk.server.JkMain start
  INFO: Jk running ID=0 time=0/73  config=null
  2 Sep, 2012 12:17:34 AM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 1233 ms
  </code></pre>
  
  <p>I have added below jar files in my classpath:</p>
  
  <ul>
  <li>struts2-core-2.3.4.1.jar</li>
  <li>commons-beanutils-1.8.0.jar</li>
  <li>commons-chain-1.2.jar</li>
  <li>commons-collections-3.1.jar</li>
  <li>commons-digester-2.0.jar</li>
  <li>commons-fileupload-1.2.2.jar</li>
  <li>commons-io-2.0.1.jar</li>
  <li>commons-lang-2.4.jar</li>
  <li>commons-lang3-3.1.jar</li>
  <li>commons-logging-1.1.1.jar</li>
  <li>commons-logging-api-1.1.jar</li>
  <li>freemarker-2.3.19.jar</li>
  <li>xwork-core-2.3.4.1.jar</li>
  <li>javassist-3.11.0.GA.jar</li>
  <li>ognl-3.0.5.jar</li>
  </ul>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
      &lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>I have followed <a href="https://stackoverflow.com/questions/5256939/error-filterstart-severe-exception-starting-filter-struts2-java-lang-classnot">this</a> thread but no success.</p>
  
  <p>Kindly help.</p>