Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Validator Framework

 
syruss kumar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Siva Masilamani
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the error?

Do yu have validator-rules.xml?

Did you add plugin in the Struts-config.xml for validator framework?
 
syruss kumar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems the jar file is either missing or corrupted or not in the classpath.

Try using latest jar file.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Struts? What Struts jars are you deploying?
 
syruss kumar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using any IDE?

if not try adding the jar file under /WEB-INF/lib/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic