ObjectFactory.getObjectFactory() returns null from ObjectFactory in 
org.apache.struts2.config.Settings.getDefaultInstance()
---------------------------------------------------------------------------------------------------------------------------

                 Key: WW-3453
                 URL: https://issues.apache.org/jira/browse/WW-3453
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.1.8.1
            Reporter: Alex Zeng


Trying to build my own struts configuration by adding this line into 
struts.properties
struts.configuration=org.apache.struts2.config.MyPropertiesSettings

Looking into org.apache.struts2.config.Settings.java 
the line
   defaultImpl = (Settings) 
ObjectFactory.getObjectFactory().buildBean(Thread.currentThread().getContextClassLoader().loadClass(className),
 null);
in method getDefaultInstance() 
throws NullPointerException
since
ObjectFactory.getObjectFactory() returns null. 

Simply changing it to new ObjectFactory() fixes the problem.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to