You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Zach (JIRA)" <ji...@apache.org> on 2007/04/15 17:13:43 UTC

[jira] Created: (WW-1884) Validator Randomly Fails Valid Input

Validator Randomly Fails Valid Input
------------------------------------

                 Key: WW-1884
                 URL: https://issues.apache.org/struts/browse/WW-1884
             Project: Struts 2
          Issue Type: Bug
          Components: Actions, Interceptors
    Affects Versions: 2.0.6
         Environment: java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
struts2-core-2.0.6.jar
struts2-tiles-plugin-2.0.6.jar
xwork-2.0.1.jar

            Reporter: Zach


On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
	@Validations(
			requiredStrings = {
					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
			}
	)
I think the error is caused by an exception:
Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
	at ognl.SimpleNode.setValue(SimpleNode.java:246)
	...

I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Rainer Hermanns (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40916 ] 

Rainer Hermanns commented on WW-1884:
-------------------------------------

Zach,
I need more infos on this...
Could you please attach the struts.xml configuration and the Action implementation to this issue?

tia,
Rainer

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>             Fix For: 2.0.8
>
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "sebastien b. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40888 ] 

sebastien b. commented on WW-1884:
----------------------------------

I had the same errors but I found the solution. I use now the xwork package with version 2.0.2. 

The errors disappeared. 

Cordially 

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Zach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40897 ] 

Zach commented on WW-1884:
--------------------------

XWork 2.0.2 does not fix the problem for me.  I still get the same problem and the SEVERE Log still comes up:

Apr 24, 2007 10:07:31 PM org.apache.struts2.dispatcher.Dispatcher getSaveDir
INFO: Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir
Apr 24, 2007 10:07:31 PM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'categoryId' with value '[Ljava.lang.String;@157011e'
Apr 24, 2007 10:07:31 PM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'logoContentType' with value '[Ljava.lang.String;@10a8143'
Apr 24, 2007 10:07:31 PM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'logoFileName' with value '[Ljava.lang.String;@ac8360'
Apr 24, 2007 10:07:31 PM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'photoContentType' with value '[Ljava.lang.String;@1e534cb'
Apr 24, 2007 10:07:31 PM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'photoFileName' with value '[Ljava.lang.String;@ed3bff'
Apr 24, 2007 10:07:31 PM org.apache.struts2.interceptor.FileUploadInterceptor intercept
INFO: Removing file logo C:\eclipse\wkspc\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\whoda\upload_2e558e9d_11226b51165__8000_00000081.tmp
Apr 24, 2007 10:07:31 PM org.apache.struts2.interceptor.FileUploadInterceptor intercept

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Rainer Hermanns (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rainer Hermanns updated WW-1884:
--------------------------------

    Fix Version/s: 2.0.8
         Assignee: Rainer Hermanns

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>         Assigned To: Rainer Hermanns
>             Fix For: 2.0.8
>
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Rainer Hermanns (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rainer Hermanns resolved WW-1884.
---------------------------------

    Resolution: Fixed

Resolved with the upcoming XW 2.0.3 release

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>         Assigned To: Rainer Hermanns
>             Fix For: 2.0.8
>
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Caine Lai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40921 ] 

Caine Lai commented on WW-1884:
-------------------------------

I have the exact same issue here.  I'm not using a struts.xml file.  All my configuration is done via annotations.  Here is an action that has the issue mentioned above:

@Results({
    @Result(name=Action.SUCCESS, value=ACTION_HOME, type=ServletActionRedirectResult.class),
    @Result(name=Action.INPUT, value=VIEW_LOGIN, type=FreemarkerResult.class)
})
@Validation()
public class LoginAction extends ActionSupport implements Preparable, ServletRequestAware {
		
	private static final long serialVersionUID = 1L;
	
	private final Logger log = Logger.getLogger(getClass());
						
    public String execute() throws Exception {
    
        InitialContext initialContext = new InitialContext();
          	    	
    	UserServiceLocal userService = (UserServiceLocal) 
    		initialContext.lookup(JNDI_NAME_LOCAL_USER_SERVICE);
    	
    	User user = null;
    	try {
    		log.debug("Checking login for user: " + getUsername());
    		user = userService.login(getUsername(), getPassword());
    	}
    	catch (UserNotFoundException ex) {
    		log.debug("Invalid username: " + getUsername() + " -> " + ex);
    		addActionError(getText("i18n.login.invalidUsername"));
    		return INPUT; 
    	}
    	catch (InvalidPasswordException ex) {
    		log.debug("Invalid password for user: " + getUsername() + " -> " + ex);
    		addActionError(getText("i18n.login.invalidPassword"));
    		return INPUT; 
    	}
    	// Successful login.  Store the user object in the session.
    	HttpSession session = this.servletRequest.getSession();
    	session.setAttribute(LOGGED_IN_USER_SESSION_ATTRIBUTE, user);
    	
    	log.debug("Successful login for user: " + getUsername());
        return SUCCESS;
    }
    
    public void prepare() {
    	this.username = "mack.daddy@mack.com";
    }
        
    public void setServletRequest(HttpServletRequest request) {
    	this.servletRequest = request;
    }
    
    private HttpServletRequest servletRequest;
    public HttpServletRequest getServletRequest() {
    	return servletRequest;
    }
            
    private String username;    
    public String getUsername() {
        return username;
    }   
    
    @RequiredStringValidator(message = "Username is required.", key = "i18n.validation.username", shortCircuit = true, trim = true)
    @StringLengthFieldValidator(message = "You exceeded the max character limit.", key = "i18n.validation.fieldTooLong", shortCircuit = true, trim = true, minLength = "1",  maxLength = "255")
    public void setUsername(String username) {
        this.username = username;
    }

    private String password;    
    public String getPassword() {
        return password;
    } 
    
    @RequiredStringValidator(message = "Password is required.", key = "i18n.validation.password", shortCircuit = true, trim = true)
    @StringLengthFieldValidator(message = "You exceeded the max character limit.", key = "i18n.validation.fieldTooLong", shortCircuit = true, trim = true, minLength = "1",  maxLength = "50")
    public void setPassword(String password) {
        this.password = password;
    }
}

By the way, here is a discussion on the OpenSymphony boards regarding this issue:  http://forums.opensymphony.com/thread.jspa?messageID=139232

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>         Assigned To: Rainer Hermanns
>             Fix For: 2.0.8
>
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "santosh yadav (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40836 ] 

santosh yadav commented on WW-1884:
-----------------------------------

I am trying to use dateRangeValidator with annotations in Struts 2.0.6. But getting this error 
"org.apache.commons.logging.impl.Jdk14Logger warn Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator'. 
ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator.methodName"

Looks like many annotation validators (viz RequiredFieldValidator, URLValidator) throwing this error in Struts 2.0.6.

I saw comment from Ted H. about setting devMode to false but unfortunately doesnt seem to work for me.

Any help/suggestion/fix will be highly appreciated...

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Zach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40799 ] 

Zach commented on WW-1884:
--------------------------

Actually, I went ahead and implemented my own validation by hand and still managed to fail my own validation.  It seems that sometimes, for no apparent common cause, values will not get set into my ActionSupport object.  I have noticed this SEVERE message pop-up when it happens:

Apr 15, 2007 11:47:32 AM com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'companySearch' with value '[Ljava.lang.String;@1f38d7d'


I have been to the xwork2 to see if there are any known issues with this, and I don't see any.  This might just be a Struts only issue.  I'm still stumped and any help/patches would be greatly appreciated....

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1884) Validator Randomly Fails Valid Input

Posted by "Alan D. Cabrera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40842 ] 

Alan D. Cabrera commented on WW-1884:
-------------------------------------

I also get the same error as what's in the description using Struts 2.0.7 and JDK1.5

> Validator Randomly Fails Valid Input
> ------------------------------------
>
>                 Key: WW-1884
>                 URL: https://issues.apache.org/struts/browse/WW-1884
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Interceptors
>    Affects Versions: 2.0.6
>         Environment: java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
> struts2-core-2.0.6.jar
> struts2-tiles-plugin-2.0.6.jar
> xwork-2.0.1.jar
>            Reporter: Zach
>
> On occasion, I'm receiving validation failures on valid input.  Struts redirects to the form page and set's invalid input messages.  I'm using only the required strings validations:
> 	@Validations(
> 			requiredStrings = {
> 					@RequiredStringValidator(type = ValidatorType.SIMPLE, fieldName = "req", message = "msg", shortCircuit = true, trim = true)
> 			}
> 	)
> I think the error is caused by an exception:
> Apr 15, 2007 10:08:49 AM com.opensymphony.xwork2.util.OgnlUtil internalSetProperty
> WARNING: Caught OgnlException while setting property 'methodName' on type 'com.opensymphony.xwork2.validator.validators.RequiredStringValidator'.
> ognl.NoSuchPropertyException: com.opensymphony.xwork2.validator.validators.RequiredStringValidator.methodName
> 	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
> 	at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:68)
> 	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
> 	at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
> 	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
> 	at ognl.SimpleNode.setValue(SimpleNode.java:246)
> 	...
> I would be willing to bet this has already been logged, and probably fixed, but I can't find a bug logged in this system that says it has.  I also tried to build the latest trunk this morning, but maven reported 11 Test errors and would not complete the build.  I apologize if the fix is already out there, but I'm logging this in case this is a new 2.0.6 issue.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.