You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Anna Komaristaia (JIRA)" <ji...@apache.org> on 2006/10/19 21:30:35 UTC
[jira] Created: (VALIDATOR-206) NullPointerException in
"ValidatorAction" class when we start application in Unix
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
[jira] Commented: (VALIDATOR-206) NullPointerException in
"ValidatorAction" class when we start application in Unix
Posted by "Anna Komaristaia (JIRA)" <ji...@apache.org>.
[ 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
[jira] Resolved: (VALIDATOR-206) NullPointerException in
"ValidatorAction" class when we start application in Unix
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VALIDATOR-206?page=all ]
Niall Pemberton resolved VALIDATOR-206.
---------------------------------------
Resolution: Won't Fix
Resolving this as WONT FIX, since theres a configurable solution.
> 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
[jira] Commented: (VALIDATOR-206) NullPointerException in
"ValidatorAction" class when we start application in Unix
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VALIDATOR-206?page=comments#action_12446212 ]
Niall Pemberton commented on VALIDATOR-206:
-------------------------------------------
Validator has a "feature" to tell it to use the context class loader - can you see if that resolves your issue:
On the "Validator" class use the setUseContextClassLoader(true) method
Niall
> 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