Web tier: servlets, JSP, Web frameworks: struts validation framework issue ---load() exception

  1. struts validation framework issue ---load() exception (5 messages)

    Hi Friends, i was developed one registration form in struts framework.while submit the form records are stored into database.now i want apply the validator framework for that form. in struts-config.xmil file i can add this one. after deploying it shows one exception. the log file show this type code. please give me good solution on this issue. Prasad.P ----------------------------------------------------------- 2008-12-09 18:23:41 StandardContext[/AdPortal]Servlet /AdPortal threw load() exception javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml' at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:172) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
  2. Have you got the following files? "/WEB-INF/validator-rules.xml" "/WEB-INF/validation.xml" Please check whether the files are empty, or any permission issues on *nix platforms.
  3. Hi Jyothish John, thank you for your reply. i got "/WEB-INF/validator-rules.xml" "/WEB-INF/validation.xml" those files.those files containe validations code. in my application no permissions are declared. and one more thing, if i'm removing the tag in struts-config.xml file my home page will be displayed. again if i'm place this tag. my home page is not opened.it raises same exception as the given below HTTP Status 503 - Servlet action is currently unavailable exception. i can also use 1 in web.xml file,again it shows same exception. please help me. thank you in advance. Prasad.p
  4. Prasad, You might be better served to use the blank war project supplied by Struts, if you are not already using it. Since minor errors might be difficult to discern without seeing your whole configuration, what is supposed to work out of the box might serve you better. You could then compare that with whatever setup that you have.
  5. Hi All, I got the solution for the above issue. I was checked in validation.xml file.Actually I used 2 personaldetails form and salaryDetails forms in validation.xml file.i was apply the rules for personaldetails form. I'didn't want second form validation. but i use 2 forms in the validation.xml.ie one form is used and apply the rules and second form is not used and not apply any rules. Due to that Mistake only my tag in struts-config.xml can't parse by the container and raise the 503 Servlet Action exception. if i was remove that second form or put it comments the validation rules is applied to the PersonalDetails form. now it is working. Conculude of this Issues is if you want to apply the validation to the forms those form names should Exists first. and just use the which of form's validation is required those form's to be placed in validation.xml file. Prasad.P
  6. Hi Please take a look at the validation framework in struts.apache.org site and then debugging the code is easier.