commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anna Komaristaia (JIRA)" <j...@apache.org>
Subject [jira] Commented: (VALIDATOR-206) NullPointerException in "ValidatorAction" class when we start application in Unix
Date Wed, 01 Nov 2006 22:15:19 GMT
    [ http://issues.apache.org/jira/browse/VALIDATOR-206?page=comments#action_12446391 ] 
            
Anna Komaristaia commented on VALIDATOR-206:
--------------------------------------------

Thanks a lot for your help !

It works after I put in my code validator.setUseContextClassLoader(true);

Thanks,
//Anna


> NullPointerException  in "ValidatorAction" class  when we start application in Unix
> -----------------------------------------------------------------------------------
>
>                 Key: VALIDATOR-206
>                 URL: http://issues.apache.org/jira/browse/VALIDATOR-206
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.0 Release, 1.2.0 Release
>         Environment: Unix
>            Reporter: Anna Komaristaia
>
> When I start the application in Unix, there is the NullPointerException going from the
next methods in  "ValidatorAction" class 
>     -  loadValidationClass( ClassLoader )
>     -  loadParameterClasses( ClassLoader )
>     
>     ClassLoadet parameter is null.
> This is the printout from Unix console:
> ERROR validator.ValidatorAction     - Unhandled exception thrown during validation: null
> java.lang.NullPointerException
>         at org.apache.commons.validator.ValidatorAction.loadValidationClass(ValidatorAction.java:623)
>         at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:531)
>         at org.apache.commons.validator.Field.validateForRule(Field.java:766)
>         at org.apache.commons.validator.Field.validate(Field.java:846)
>         at org.apache.commons.validator.Form.validate(Form.java:290)
>         ...
> java.lang.NullPointerException
>         at org.apache.commons.validator.ValidatorAction.loadParameterClasses(ValidatorAction.java:652)
>         at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:532)
>         at org.apache.commons.validator.Field.validateForRule(Field.java:766)
>         at org.apache.commons.validator.Field.validate(Field.java:846)
>         at org.apache.commons.validator.Form.validate(Form.java:290)
>         at org.apache.commons.validator.Validator.validate(Validator.java:354)
>         ...
> I recompiled the commons-validator jar  with the next change  and it's working fine in
PC and Unix:
>             if( loader == null )
>                    this.validationClass = Class.forName(this.classname);
>             else
>                    this.validationClass = loader.loadClass(this.classname);
> Thanks,
> //Anna

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message