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

Validator struts 1.2.4 vs 1.2.7 [Solved]

P-A Rosenberg
Greenhorn

Joined: Sep 22, 2005
Posts: 15
Hi

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 (ValidatorForm.java:112) 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
.http.HttpServletRequest)
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(ValidatorAction.java:62
7)
at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java
:557)
at org.apache.commons.validator.Field.validateForRule(Field.java:827)
at org.apache.commons.validator.Field.validate(Field.java:906)
at org.apache.commons.validator.Form.validate(Form.java:174)
at org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:110)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:928)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:204)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at se.vodafone.proweb.web.action.ProwebActionServlet.process(ProwebActionServlet.java:39)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P
rotocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.ja
va:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
---

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

Solved!
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: http://aspose.com/file-tools
 
subject: Validator struts 1.2.4 vs 1.2.7 [Solved]
 
Similar Threads
Validator with Struts Problem ?
validation Exception !!!!!
Struts Validation problem
Exception in the validator
Struts validation exception