commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: Commons validator
Date Thu, 17 Aug 2006 17:21:01 GMT
The method signature in the FieldChecks class doesn't match what you
have specified in the validator-rules.xml config file.

Usually this happens when you upgrade to a later version of Struts,
but don't upgrade the validator-rules.xml file - make sure you upgrade
to the validator-rules.xml thats shipped with the version of Struts
you're using.

Niall

On 8/17/06, Joe Yuen <joe.yuen@chisq.com> wrote:
>
> I was able to get passed this problem but now I get the following error:
>
> 08:52:59,503 ERROR DynaValidatorForm:112 - org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest)
> org.apache.commons.validator.ValidatorException: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest)
>         at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627)
>         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.DynaValidatorForm.validate(DynaValidatorForm.java:110)
>         at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: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.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:869)
>         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Unknown Source)
>
> I don't understand what this stack trace is telling me. Could someone explain what is
going on?
>
> Thanks.
>
> -----Original Message-----
> From: Niall Pemberton [mailto:niall.pemberton@gmail.com]
> Sent: Wed 8/16/2006 5:41 PM
> To: Jakarta Commons Users List
> Subject: Re: Commons validator
>
> When your struts application starts up it parses the validation xml
> files you specify for Struts's validator plugin and creates the
> configuration objects needed by Commons Validator and stores them in
> application scope. These are the "resources" its referring to.
>
> When your ActionForm's validate method is called it tries to retrieve
> those "resources" from application scope to get the configured
> validation rules to use for the form.
>
> If it can't find the "resources" then it looks like something has gone
> wrong at startup - first place to check the configuration you have in
> struts for validator - and the logs to see if there are any
> errors/warnings at startup time.
>
> You'll probably get more help asking Struts related questions for
> validator on the Struts user list.
>
> http://struts.apache.org/1.2.x/userGuide/dev_validator.html
>
>
> Niall
>
>
> On 8/17/06, Joe Yuen <joe.yuen@chisq.com> wrote:
> >
> > I am trying to setup my struts web application to use the commons validator. However,
I must not have set it up properly. After going through the setup I am getting the following
error:
> >
> > java.lang.IllegalArgumentException: Resources cannot be null.
> >         org.apache.commons.validator.Validator.<init>(Validator.java:188)
> >         org.apache.struts.validator.Resources.initValidator(Resources.java:475)
> >         org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:104)
> >         org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950)
> >         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
> >         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> >         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > Can anyone enlighten me on what resources this error is referring to?
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message