struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Zeng (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3453) ObjectFactory.getObjectFactory() returns null from ObjectFactory in org.apache.struts2.config.Settings.getDefaultInstance()
Date Wed, 02 Jun 2010 01:45:44 GMT
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.


Mime
View raw message