Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C40711108 for ; Fri, 1 Aug 2014 08:20:40 +0000 (UTC) Received: (qmail 86822 invoked by uid 500); 1 Aug 2014 08:20:39 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 86792 invoked by uid 500); 1 Aug 2014 08:20:39 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 86778 invoked by uid 99); 1 Aug 2014 08:20:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 08:20:39 +0000 Date: Fri, 1 Aug 2014 08:20:39 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (WW-3992) TypeConversion fails in Struts 2.3.8 in devMode due to configuration xml reload instead of annotation config MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-3992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukasz Lenart updated WW-3992: ------------------------------ Description: 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} {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. was: With struts.devMode is set to true, each request the BeanSelectionProvider class evaluates this code: if ("true".equalsIgnoreCase(props.getProperty(StrutsConstants.STRUTS_DEVMODE))) { ... props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "true"); ... It causes @TypeConversion will not recognize by XWorkConverter class in method conditionalReload() it tries to reload xml configuration instead of annotation configurations then this: ... URL fileUrl = ClassLoaderUtil.getResource(buildConverterFilename(clazz), clazz); ... returns null then it causes nullPointerException in the next line, so no conversion is applied. Trying to solve this, but with no success then, temporary solution to no set to false struts.devMode until someone helps me, recompile BeanSelectionProvider with: ... props.setProperty(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, "false"); ... when devMode is true. > 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 > 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} > > > {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)