struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3850) NullPointerException loading xwork validator since 2.3.4
Date Sat, 21 Jul 2012 13:45:34 GMT

    [ https://issues.apache.org/jira/browse/WW-3850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419837#comment-13419837
] 

Hudson commented on WW-3850:
----------------------------

Integrated in Struts2 #503 (See [https://builds.apache.org/job/Struts2/503/])
    WW-3850 solves problem with NPE when ActionValidationManager is trying to load Object-validation.xml
(Revision 1364079)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManager.java
* /struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/DefaultActionValidatorManagerTest.java

                
> NullPointerException loading xwork validator since 2.3.4
> --------------------------------------------------------
>
>                 Key: WW-3850
>                 URL: https://issues.apache.org/jira/browse/WW-3850
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.4
>            Reporter: Eric Chatellier
>            Assignee: Lukasz Lenart
>              Labels: xwork
>             Fix For: 2.3.5
>
>         Attachments: WW-3850.diff
>
>
> Since 2.3.4 update, loading xworks validator with
> ActionValidatorManager#getValidators(Class, null) cause
> null pointer exception.
> Here is the stack trace:
> {code}Caused by: java.lang.NullPointerException
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.loadFile(DefaultActionValidatorManager.java:330)
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.buildClassValidatorConfigs(DefaultActionValidatorManager.java:237)
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.buildValidatorConfigs(DefaultActionValidatorManager.java:316)
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.buildValidatorConfigs(DefaultActionValidatorManager.java:297)
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.buildValidatorConfigs(DefaultActionValidatorManager.java:297)
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.getValidators(DefaultActionValidatorManager.java:82)
> 	at com.opensymphony.xwork2.validator.DefaultActionValidatorManager.getValidators(DefaultActionValidatorManager.java:74){code}
> The error occurs when following code is executed:
> {code}URL fileUrl = ClassLoaderUtil.getResource(fileName, clazz);
> if ((checkFile && fileManager.fileNeedsReloading(fileUrl.toString())) || !validatorFileCache.containsKey(fileName))
{{code}
> with fileName = Object-validation.xml
> this file doesn't exists, so getResource returns null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message