Cannot load a validator resource from '/WEB-INF/validator-rules


General J2EE: Cannot load a validator resource from '/WEB-INF/validator-rules

  1. hi all,
    before i add <plug-in ValidatorPlugIn ... everything works fine with tomcat 4.0.4, JDK,
     struts 1.2.4 and Hibernate and MS access. But when I add plug-in to use default validation
    error occurs.

    Apache Tomcat/4.0.4 - HTTP Status 503 - Servlet action is currently unavailable


    type Status report

    message Servlet action is currently unavailable

    description The requested service (Servlet action is currently unavailable) is not currently available.
    in log file :
    2005-07-17 08:11:28 StandardWrapper[:action]: Marking servlet action as unavailable
    2005-07-17 08:11:28 StandardContext[]: Servlet 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.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 org.apache.catalina.startup.Catalina.execute(
    at org.apache.catalina.startup.Catalina.process(
    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.main(



    Threaded Messages (4)

  2. Servlet action is not available[ Go to top ]

    I am getting the same error the moment I add the validator plugin to the struts-config.xml file.
    Does it have to do with the placement of the plugin element?
    This is what I have in my struts-config.xml file -

    <?xml version="1.0" encoding="ISO-8859-1" ?>

    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
              "" >


      <!-- ========== Form Bean Definitions ================= -->

        <form-bean name="loginForm"
        <form-bean name="arForm"
      <!-- ============== Global exceptions ============== -->
            <exception type=""
        <!-- ============== Global forwards ============== -->
            <forward name="login" path="/Login.jsp"/>
            <forward name="error" path="/Error.jsp"/>
      <!-- ========== Action Mapping Definitions ============ -->

        <action path="/login"
            <forward name="success" path="/"/>
        <action path="/setupAR" forward="/SelectAR.jsp"/>
        <action path="/generateAR"
            <forward name="success" path="/Confirmation.jsp"/>
        <action path="/logout"
                  type="com.pacelabs.argenerator.LogoutAction" />

      <!-- ========== Message Resources Definitions =================== -->

      <!-- ========== Struts Validator plugin =================== -->
      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames"

  3. One Solution[ Go to top ]

    Hi all,
    I solved my problem as below:

    I already deleted validator plugin from struts blank then made my application, but when I wanted to add it again, It made error,
    now I use a struts blank without deleting its validator plugin then I add my pages to that, and it works fine.

    I hope this helps you.

  4. My Solution[ Go to top ]

    I met the same problem and solved it:
    there is a bug in the source code of struts validator,I replace the commons-validator.jar file by the other one that worked fine,the exception disappeared!

    You can try it,I'm sure it work!

    Gook luck!
  5. Re: One Solution[ Go to top ]

    Hi mary malven, I'm suffering from same problem now.could u expline it indetails.i'm unable to find the problem where the excatly problem.and how to resovle this problem. i tried which you have posted early.still i got same problem. thanks in advance. prasad.p