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

Lukasz Lenart updated WW-3365:
------------------------------

    Fix Version/s: Future

Did you try to ask on the User ML ?
                
> There will be no log4j error message while it displays warning "The visited 
> object is null, VisitorValidator will not be able to handle validation 
> properly. Please make sure the visited object is not null for 
> VisitorValidator to function properly"
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3365
>                 URL: https://issues.apache.org/jira/browse/WW-3365
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.1.2
>         Environment: Tomcat 6.0 + Struts 2.1.2
>            Reporter: jession ji
>             Fix For: Future
>
>
> We use log4j debug in all validator methods to get the detail for illegal 
> input. And we found that there will might be no log4j log and a waring on 
> tomcat server "The visited object is null, VisitorValidator will not be able 
> to handle validation properly. Please make sure the visited object is not 
> null for VisitorValidator to function properly". It will be OK after we 
> restart tomcat server. This issue can not be found every time. Could anyone 
> give me some advice?
> public void validate(Object object) throws ValidationException {
>         String fieldName = getFieldName();
>         String val = (String) getFieldValue(fieldName, object);
>         log.logInfo("Field:" + fieldName + " &Value:" + val);
>         if ((minLength > -1) && (val.length() < minLength)) {
>             addFieldError(fieldName, object);
>         } else if ((maxLength > -1) && (val.length() > maxLength)) {
>               log.logError("Input validation max length checking 
> failure:"+fieldName);
>             addFieldError(fieldName, object);
>         }

--
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

        

Reply via email to