struts validation framework issue ---load() exception


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 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( at org.apache.struts.action.ActionServlet.initModulePlugIns( at org.apache.struts.action.ActionServlet.init( at javax.servlet.GenericServlet.init( at org.apache.catalina.core.StandardWrapper.loadServlet( at org.apache.catalina.core.StandardWrapper.load( at org.apache.catalina.core.StandardContext.loadOnStartup( at org.apache.catalina.core.StandardContext.start( at org.apache.catalina.core.ContainerBase.addChildInternal( at org.apache.catalina.core.ContainerBase.addChild( at org.apache.catalina.core.StandardHost.addChild( at org.apache.catalina.core.StandardHostDeployer.install( at org.apache.catalina.core.StandardHost.install( at org.apache.catalina.startup.HostConfig.deployDirectories( at org.apache.catalina.startup.HostConfig.deployApps( at org.apache.catalina.startup.HostConfig.start( at org.apache.catalina.startup.HostConfig.lifecycleEvent( at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( at org.apache.catalina.core.ContainerBase.start( at org.apache.catalina.core.StandardHost.start( at org.apache.catalina.core.ContainerBase.start( at org.apache.catalina.core.StandardEngine.start( at org.apache.catalina.core.StandardService.start( at org.apache.catalina.core.StandardServer.start( at org.apache.catalina.startup.Catalina.start( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at org.apache.catalina.startup.Bootstrap.start( at org.apache.catalina.startup.Bootstrap.main(
  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 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 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 site and then debugging the code is easier.