struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (WW-3453) ObjectFactory.getObjectFactory() returns null from ObjectFactory in org.apache.struts2.config.Settings.getDefaultInstance()
Date Mon, 25 Mar 2013 21:01:16 GMT

     [ https://issues.apache.org/jira/browse/WW-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lukasz Lenart resolved WW-3453.
-------------------------------

    Resolution: Won't Fix

ObjectFactory.getObjectFactory() is deprecated
                
> 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
>             Fix For: 3.0
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message