You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bh...@wipro.com on 2007/06/01 08:52:45 UTC

Exception while using validator framework

Hi all,

 

I have created a sample struts application

Im trying to make use of the validator framework

 

The steps which i have carried out are

 

1 .I have included validation.xml and validation-rules.xml in WEB-INF

 

2 .then in struts-config.xml i have included

 

the required 

 

 <plug-in className="org.apache.struts.validator.ValidatorPlugIn">

  <set-property 

    property="pathnames" 

    value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>

</plug-in>

     

but when i deploy the war file  i get exception

 

like

 

 

 

19:57:00,515 ERROR [ActionServlet] Unable to initialize Struts
ActionServlet due to an unexpected exception or error thrown, so marking
the servlet as unavailable.  Most likely, this is due to an incorrect or
missing library dependency.

java.lang.NoSuchMethodError:
org.apache.commons.validator.ValidatorResources.<init>([Ljava/io/InputSt
ream;)V

            at
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugI
n.java:237)

            at
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:16
2)

            at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava: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.jav
a:1091)

            at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)

            at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3857)

            at org.apach

 

 

and i dont know how to proceed with this....

please help me in resolving this issue

 

 

Thanks and Regards

Bhanuprakash




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

RE: Exception while using validator framework

Posted by bh...@wipro.com.
Thanks for your kind response Wang
Yes I have the required commons-validator.jar in the  /web-inf/lib

Regards
Bhanu

-----Original Message-----
From: wang huan [mailto:fitzwilliam.aaron@gmail.com] 
Sent: Friday, June 01, 2007 12:29 PM
To: Struts Users Mailing List
Subject: Re: Exception while using validator framework

>
> 19:57:00,515 ERROR [ActionServlet] Unable to initialize Struts
> ActionServlet due to an unexpected exception or error thrown, so marking
> the servlet as unavailable.  Most likely, this is due to an incorrect or
> missing library dependency.
>
> java.lang.NoSuchMethodError:
> org.apache.commons.validator.ValidatorResources.<init>([Ljava/io/InputSt
> ream;)V



Are you sure you have "commons-validator.jar" under yourApp/web-inf/lib?

-- 
北半球的狗几月份掉毛?


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Exception while using validator framework

Posted by wang huan <fi...@gmail.com>.
>
> 19:57:00,515 ERROR [ActionServlet] Unable to initialize Struts
> ActionServlet due to an unexpected exception or error thrown, so marking
> the servlet as unavailable.  Most likely, this is due to an incorrect or
> missing library dependency.
>
> java.lang.NoSuchMethodError:
> org.apache.commons.validator.ValidatorResources.<init>([Ljava/io/InputSt
> ream;)V



Are you sure you have "commons-validator.jar" under yourApp/web-inf/lib?

-- 
北半球的狗几月份掉毛?

Re: Exception while using validator framework

Posted by "Fitzwilliam.Aaron" <fi...@gmail.com>.
>
>
>
Guess you used the wrong version of the "commons-validator.jar".

Luck.

Fitzwilliam
-- 
北半球的狗几月份掉毛?

Re: Exception while using validator framework

Posted by "Fitzwilliam.Aaron" <fi...@gmail.com>.
Tell me those things:

1. struts' version u r using;
2. DOCTYPE of both validation.xml and validation-rules.xml

-- 
北半球的狗几月份掉毛?