Re: Error using Validator (newbie)

2002-12-11 Thread Rick Reumann

On Wednesday, December 11, 2002, 5:53:54 PM, Michelle wrote:

MH> However, the Struts 1.1 gives more information and says that the root 
MH> cause is because "java.lang.NoSuchFieldError: 
MH> org.apache.commons.validator.Validator: field SERVLET_CONTEXT_KEY not 
MH> found".

Double check that all your validation-xml field names for the form
you are validating match exactly to what they are actually named
in the form.


-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Error using Validator (newbie)

2002-12-11 Thread Michelle Harris
My bad. I forgot the attachments. Here they are.

Thanks again,
Michelle

Michelle Harris wrote:


Hello, I'm very new to using the Struts' Validator (have been using 
Husted's Struts In Action as a guide). I am trying most to use 
Validator in Struts 1.0.2 as that is required by my company. However, 
I have tried my webapp in Struts 1.1 in an attempt to get it to work 
as well. When I hit the submit button on a simple login form, I get a 
NullPointerException in version 1.0.2 and a regular Exception in 1.1. 
Both exceptions have the following line in common: <>

at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 


However, the Struts 1.1 gives more information and says that the root 
cause is because "java.lang.NoSuchFieldError: 
org.apache.commons.validator.Validator: field SERVLET_CONTEXT_KEY not 
found". Of course, my form doesn't contain a field called 
"SERVLET_CONTEXT_KEY".

I am running Tomcat 4.1.12 with java 1.3.

I am attaching the stack traces for Struts 1.0 and for Struts 1.1. Any 
help you could give on this would be greatly appreciated.

Many thanks,
Michelle Harris


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 





Stack trace for 1.0.2.

java.lang.NullPointerException
at org.apache.commons.validator.Validator.(Unknown Source)
at org.apache.struts.validator.action.ValidatorForm.initValidator(Unknown 
Source)
at org.apache.struts.validator.action.ValidatorForm.validate(Unknown Source)
at 
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2039)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1498)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:505)
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.invokeNext(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.invokeNext(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.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.invokeNext(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.processConnection(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:512)


2002-12-11 17:01:34 StandardWrapperValve[strutstest]: Servlet.service() for servlet 
strutstest threw exception
javax.servlet.ServletException: Servlet execution threw an exception
at 
org.apache.catalina.core.ApplicationFilterChain.intern

Error using Validator (newbie)

2002-12-11 Thread Michelle Harris
Hello, I'm very new to using the Struts' Validator (have been using 
Husted's Struts In Action as a guide). I am trying most to use Validator 
in Struts 1.0.2 as that is required by my company. However, I have tried 
my webapp in Struts 1.1 in an attempt to get it to work as well. When I 
hit the submit button on a simple login form, I get a 
NullPointerException in version 1.0.2 and a regular Exception in 1.1. 
Both exceptions have the following line in common: <>

at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 


However, the Struts 1.1 gives more information and says that the root 
cause is because "java.lang.NoSuchFieldError: 
org.apache.commons.validator.Validator: field SERVLET_CONTEXT_KEY not 
found". Of course, my form doesn't contain a field called 
"SERVLET_CONTEXT_KEY".

I am running Tomcat 4.1.12 with java 1.3.

I am attaching the stack traces for Struts 1.0 and for Struts 1.1. Any 
help you could give on this would be greatly appreciated.

Many thanks,
Michelle Harris


--
To unsubscribe, e-mail:   
For additional commands, e-mail: