I'm getting the same error. I'm using DynaValidatorForm though <form-bean name="filterForm" dynamic="true" type="org.apache.struts.validator.DynaValidatorActionForm">
My validation.xml is: <form-validation> <form name="filterForm"> <field property="prop1" depends="required"> <arg0 key="label.prop1"/> </field> <field property="prop2" depends="required,long"> <arg0 key="label.prop2"/> </field> </form> </form-validation> btw, where I can find the documentation on validation.xml? Dean Chen -----Original Message----- From: Fernando Esteban Barril Otero [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:51 PM To: Struts Users Mailing List Subject: Re: please help - validator null pointer Try to put the dynamic="true" attribute in your form-bean definition. <form-bean name="myForm" dynamic="true" type="com.ponthrops.web.MyForm" /> (MyForm extends ValidatorForm) I was getting a NullPointerException in the getDynaClass() method inside the validate() and it worked after I put the dynamic attribute (which tells that the bean have dynamic properties). Fernando ----- Original Message ----- From: "Peter Onthrops" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 31, 2002 3:37 PM Subject: please help - validator null pointer > > I am having problems installing the validator. I am getting a NullPointerException (see below) in the validate method of ...commons.validator.Validator. I followed the install instructions and just can't figure out what is causing the exception. Has anyone encountered this? > > ------------------------------------------- > > java.lang.NullPointerException > at org.apache.commons.validator.Validator.validate(Unknown Source) > at org.apache.struts.validator.action.ValidatorForm.validate(Unknown Sou > rce) > at org.apache.struts.action.ActionServlet.processValidate(ActionServlet. > java:2038) > at org.apache.struts.action.ActionServlet.process(ActionServlet.java:149 > 7) > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:504) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) > at com.evermind[Orion/1.5.4 (build 10585)]._deb._lnc(.:514) > at com.evermind[Orion/1.5.4 (build 10585)]._deb._wmb(.:170) > at com.evermind[Orion/1.5.4 (build 10585)]._co._wbb(.:581) > at com.evermind[Orion/1.5.4 (build 10585)]._co._fs(.:189) > at com.evermind[Orion/1.5.4 (build 10585)]._bt.run(.:62) > > ----------------------------------------- > > My configuration is as follows. > > 1) /WEB-INF/struts-config.xml > > <form-bean name="myForm" type="com.ponthrops.web.MyForm" /> (MyForm extends ValidatorForm) > > 2) /WEB-INF/validation.xml > > <form-validation> > <global> > </global> > <formset> > <form name="myForm"> > <field property="firstName" > indexedProperty="member" > indexedListProperty="members" > depends="required"> > <arg0 key="error.firstname.displayname"/> > </field> > </form> > </formset> > </form-validation> > > > 3) validator-rules.xml includes the validator "required" > > 4) /WEB-INF/lib includes commons-validator.jar, struts-validator.jar, and jakarta-regexp-1.2.jar > > 5) web.xml includes the example servet config given in the install directions > > My guess is I missed a configuration step, however I can't seem to figure out where. > > Any help is greatly appreciated. > > > > Thanks so much, > > Petra -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>