title: SpringObjectFactory Error in creating application in struts2.3.7
body: <p>I am migrating from sruts2.1.6 to struts2.3.7. , I have added the required jar-files recommended by apache to my class-path. Please check the listed file:-</p>
  
  <p><img src="https://i.stack.imgur.com/Oysr2.jpg" alt="enter image description here"></p>
  
  <p>My web.xml is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;First_Struts2.3.7_Demo&lt;/display-name&gt;
  
    &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;
  
    &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;Welcome.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>My struts.xml file look like below as I am have'nt added any action right now:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE struts PUBLIC
      "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
  
  &lt;struts&gt;
      &lt;constant name="struts.devMode" value="false" /&gt;
      &lt;package name="default" extends="struts-default" namespace="/"&gt;
  
          &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>But when I build the class-path and run this project as HelloWorld kind project on <strong>tomcat-6 server</strong> ,I got following error: </p>
  
  <pre><code>org.apache.catalina.core.StandardContext filterStart
  SEVERE: Exception starting filter struts2
  Class: com.opensymphony.xwork2.spring.SpringObjectFactory
  File: SpringObjectFactory.java
  Method: getClassInstance
  Line: 230 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:230:-1
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:483)
      at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
      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)
      :754)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  
  Caused by: java.lang.NullPointerException
      at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:230)
      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)
      ... 20 more
  </code></pre>
  
  <p>I dont know why this is happening, and I am not going to combine struts with spring.
  Any help would be great. Note : xwork-core-2.3.7 is causing the error.</p>