File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Validator struts 1.2.4 vs 1.2.7 [Solved] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validator struts 1.2.4 vs 1.2.7 [Solved]" Watch "Validator struts 1.2.4 vs 1.2.7 [Solved]" New topic

Validator struts 1.2.4 vs 1.2.7 [Solved]

P-A Rosenberg

Joined: Sep 22, 2005
Posts: 15

Is there any difference on how to configure xml based validation in struts 1.2.4 vs 1.2.7?

I have a working prototype in which the validator works fine with 1.2.4 but doesn't work at all when the struts.jar is updated.

As far as I understand I do it all according to the instructions online and according to examples on this site. Since it's working with the old jar it can't be all that wrong set up.

With the new jar I get the following error msg in the logg:
2005-10-28 19:03:48,128 ERROR ( struts.validator.ValidatorForm - org.apache.
struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.Validat
orAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet
org.apache.commons.validator.ValidatorException: org.apache.struts.validator.FieldChecks.validateReq
uired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.F
ield, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest)
at org.apache.commons.validator.ValidatorAction.loadValidationMethod(
at org.apache.commons.validator.ValidatorAction.executeValidationMethod(
at org.apache.commons.validator.Field.validateForRule(
at org.apache.commons.validator.Field.validate(
at org.apache.commons.validator.Form.validate(
at org.apache.commons.validator.Validator.validate(
at org.apache.struts.validator.ValidatorForm.validate(
at org.apache.struts.action.RequestProcessor.processValidate(
at org.apache.struts.action.RequestProcessor.process(
at org.apache.struts.action.ActionServlet.process(
at se.vodafone.proweb.web.action.ProwebActionServlet.process(
at org.apache.struts.action.ActionServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
at org.apache.catalina.core.ApplicationFilterChain.doFilter(

at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P
at org.apache.tomcat.util.threads.ThreadPool$

I searched this formum for the problem and found a thread on the submect. The problem then was that the attribute errors.required were missing in the MessageResources file, this doesn't seem to be my problem.

Please post any ideas on what can be wrong.
Thank you
//P-A R

I finally solved the problem. I had updated the struts.jar but not the other jar files beloning to stuts, among them commons-validator.jar. Also the file validator-rules.xml had some changes in the new version.
//P-A R
[ October 31, 2005: Message edited by: P-A Rosenberg ]
I agree. Here's the link:
subject: Validator struts 1.2.4 vs 1.2.7 [Solved]
jQuery in Action, 3rd edition