aspose file tools
The moose likes Struts and the fly likes Struts Validator Framework Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Struts Validator Framework" Watch "Struts Validator Framework" New topic
Author

Struts Validator Framework

syruss kumar
Ranch Hand

Joined: Jul 23, 2009
Posts: 87
Hi all,

Thanks for giving support to resolve the issues.

I have written a Test Application to test Struts validation framework.
I have created a jsp and form,validation.xml .
But I got this error while i execute that application.i have surfed in the net but i couldn't find any relevant messages(Some post says that its a jar problem).




Can anyone give me a suggestion to resolve this ?
Thanks in Advance.


All search starts with beginner's luck and all search ends with victor's severly tested.
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 377
what is the error?

Do yu have validator-rules.xml?

Did you add plugin in the Struts-config.xml for validator framework?


SCJP 6,SCWCD 5,SCBCD 5

Failure is not an option.
syruss kumar
Ranch Hand

Joined: Jul 23, 2009
Posts: 87
yes already i have added the plug-in in struts-config.xml


and the error is

SEVERE: java.lang.ClassNotFoundException: org.apache.struts.util.StrutsValidator
org.apache.commons.validator.ValidatorException: java.lang.ClassNotFoundException: org.apache.struts.util.StrutsValidator
at org.apache.commons.validator.ValidatorAction.loadValidationClass(ValidatorAction.java:624)
at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:530)
at org.apache.commons.validator.Field.validateForRule(Field.java:796)
at org.apache.commons.validator.Field.validate(Field.java:876)
at org.apache.commons.validator.Form.validate(Form.java:288)
at org.apache.commons.validator.Validator.validate(Validator.java:351)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:110)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:919)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:204)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:430)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 377
It seems the jar file is either missing or corrupted or not in the classpath.

Try using latest jar file.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What version of Struts? What Struts jars are you deploying?
syruss kumar
Ranch Hand

Joined: Jul 23, 2009
Posts: 87
Hi ,

I have tried with struts1.3.10 jar and struts 1.2.6 jar.

Its in the classpath only if not we couldnt get other classes in struts.jar .

still its giving the same error.

Thanks in advance.
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 377
Are you using any IDE?

if not try adding the jar file under /WEB-INF/lib/
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Struts Validator Framework
 
Similar Threads
Need help in learning struts
LookupDispatch action with validator
Struts Validation problem
Help with validation rules for form with multiple submit buttons
Validation framework is not working