struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@blueyonder.co.uk>
Subject Re: Unhandled Exception in the Validator?
Date Thu, 01 Apr 2004 13:23:09 GMT
Its just logging.

Its always done the date validation using SimpleDateFormat.parse() and using
the ParseException to return "invalid" - for some reason in 1.2 these are
now being "logged" - all you need to do is set your logging to ignore
warnings for commons validator.

Its not because you're pushing the infrastructure - looks like its going to
happen for any old date validation in 1.2 - raise a bugzilla if you're not
happy with just changing your logging configuration.

Niall

----- Original Message ----- 
From: "Joe Hertz" <jhertz@patriot.net>
To: <struts-user@jakarta.apache.org>
Sent: Thursday, April 01, 2004 1:31 PM
Subject: Unhandled Exception in the Validator?


> I'm using a recently 1.2 nightly build, but I suspect this isn't a 1.2
issue
> necessarily. I think I'm pushing the infrastructure though.
>
> Here's how:
>
> I have a DynaValidatorActionForm which contains a List.
>
> The List elements, in this case, happen to be instances of another
DynaBean,
> which inside of the "populating" Action, I instantiate, populate, and add
to
> the List.
>
> So the page displays fine. And on it, say I enter "eweew" in a text box
entry
> corresponding to a form property that I have told the validator is
> depends=date (datePatternStrict MM/dd/yyyy).
>
> The validator works (I get my message generated by the backend [no popup],
as
> the docs say it would be handled because I am using a IndexedListProperty
to
> get into the individual items.
>
> BUT the following exception occurs from inside of the validator and I
didn't
> see anything in bugzilla.
>
> 07:17:19,252  WARN GenericTypeValidator:222 - eweew
>
> java.text.ParseException: Unparseable date: "eweew"
>
> at java.text.DateFormat.parse(DateFormat.java:334)
> at org.apache.commons.validator.GenericTypeValidator.formatDate
> (GenericTypeValidator.java:213)
> at org.apache.struts.validator.FieldChecks.validateDate
> (FieldChecks.java:519)
> at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.apache.commons.validator.ValidatorAction.executeValidationMethod
> (ValidatorAction.java:570)
> at org.apache.commons.validator.Field.validateForRule(Field.java:808)
> at org.apache.commons.validator.Field.validate(Field.java:887)
> at org.apache.commons.validator.Form.validate(Form.java:171)
> at org.apache.commons.validator.Validator.validate(Validator.java:367)
> at org.apache.struts.validator.DynaValidatorActionForm.validate
> (DynaValidatorActionForm.java:77)
> at org.apache.struts.action.RequestProcessor.processValidate
> (RequestProcessor.java:921)
> at org.apache.struts.action.RequestProcessor.process
> (RequestProcessor.java:206)
> at org.apache.struts.action.ActionServlet.process
> (ActionServlet.java:1146)
> at org.apache.struts.action.ActionServlet.doPost
> (ActionServlet.java:410)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:247)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:193)
> at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:260)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
> ext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke
> (ContainerBase.java:995)
> at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:191)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
> ext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke
> (ContainerBase.java:995)
> at org.apache.catalina.core.StandardContext.invoke
> (StandardContext.java:2396)
> at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:180)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
> ext(StandardPipeline.java:643)
> at org.apache.catalina.valves.ErrorDispatcherValve.invoke
> (ErrorDispatcherValve.java:170)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
> ext(StandardPipeline.java:641)
> at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:172)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
> ext(StandardPipeline.java:641)
> at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke
> (ContainerBase.java:995)
> at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:174)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eN
> ext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke
> (StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke
> (ContainerBase.java:995)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service
> (CoyoteAdapter.java:223)
> at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:405)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ct
> ion(Http11Protocol.java:380)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt
> (PoolTcpEndpoint.java:508)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:536)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>



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


Mime
View raw message