You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2014/08/01 10:24:38 UTC

[jira] [Resolved] (WW-3992) TypeConversion fails in Struts 2.3.8 in devMode due to configuration xml reload instead of annotation config

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

Lukasz Lenart resolved WW-3992.
-------------------------------

    Resolution: Not a Problem
      Assignee: Lukasz Lenart

Please reopen if disagree!

> TypeConversion fails in Struts 2.3.8 in devMode due to configuration xml reload instead of annotation config
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3992
>                 URL: https://issues.apache.org/jira/browse/WW-3992
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Other
>    Affects Versions: 2.3.8
>         Environment: java 1.6u24, tomcat 6.0.32
>            Reporter: Hugo Robayo
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: TypeConversion
>             Fix For: 2.3.18
>
>
> With struts.devMode is set to true, each request the BeanSelectionProvider class evaluates this code:
> {code:java}
> if ("true".equalsIgnoreCase(props.getProperty(StrutsConstants.STRUTS_DEVMODE))) {
> ...
> props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true");
> ...
> {code}
> It causes  {{@TypeConversion}} will not recognize by XWorkConverter class in method {{conditionalReload()}} it tries to reload xml configuration instead of annotation configurations then this:
> {code:java}
> ...
> URL fileUrl = ClassLoaderUtil.getResource(buildConverterFilename(clazz), clazz);
> ...
> {code}
> returns null then it causes {{NullPointerException}} in the next line, so no conversion is applied.
> Trying to solve this, but with no success
> {code:xml}
>     <constant name="reloadXmlConfiguration" value="false"/>
>     <constant name="struts.configuration.xml.reload" value="false"/>
> {code}
> then, temporary solution to no set to false struts.devMode until someone helps me, recompile BeanSelectionProvider with:
> {code:java}
> ...
> props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "false"); 
> ...
> {code}
> when  devMode is true.



--
This message was sent by Atlassian JIRA
(v6.2#6252)