- This topic has 5 replies, 4 voices, and was last updated 17 years, 8 months ago by
Riyad Kalla.
-
AuthorPosts
-
jacksparsooMemberHi,
i am to extend validation framwork in to struts by plugging in the validator configuration files…………
But i am getting the error at the start of the server………….This is the error log on my console
[8/27/05 16:30:17:243 IST] 3e36e637 ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from ‘/WEB-INF/validator-rules.xml’
[8/27/05 16:30:17:243 IST] 3e36e637 ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from ‘/WEB-INF/validation.xml’
[8/27/05 16:30:17:243 IST] 3e36e637 ActionServlet E org.apache.struts.action.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.
[8/27/05 16:30:17:274 IST] 3e36e637 ActionServlet E org.apache.struts.action.ActionServlet TRAS0014I: The following exception was logged java.lang.NoSuchMethodError: org.apache.commons.validator.ValidatorResources: method <init>([Ljava/io/InputStream;)V not foundafter loading the validator-rules.XML and validation.XML i am getting this error as 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.
can any body please tell my why this is happening……………
regards,
jack
Hermod OpstvedtParticipantHi
I am also having this problem. If I run the same project under Rational Application Developer it works fine. I am going to try it with Eclipse 3.0.2 and MyEclipse 3.8.4
Riyad KallaMemberGuys,
Somehow the version of commons-validator that is in your classpath is not the version Struts 1.2.x was built against and it is blowing up (NoSuchMethodError). Double check your project’s WEB-INF/lib dir, do you have a commons-validator.jar file there? Also check your application server’s common/lib directory, do you have another copy there?If you revert your changes to the validator config file, does your application start working again? Can you paste the contents of your validator config file?
jacksparsooMemberThanks Guys,
The commons-validator file was on correct place………
the problem was with the classpath inclusion in the server. when i removed the struts.jar file classpath in my server it worked fine………Thanks,
Jack.
leomendez81MemberHi Guys!!
I’m having problems with struts validator… I put validator-rules.xml and validation.xml files inside /WEB-INF directory and i set the plugin tag in struts-config.xml file with this two files, and i’m still getting this message on page.
500 Internal Server Error
java.lang.NoSuchMethodError: org.apache.commons.validator.ValidatorResources.<init>([Ljava/io/InputStream;)V at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:233) at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) at javax.servlet.GenericServlet.init(GenericServlet.java:256)and i don’t get any exception throwed on the console, i’m using oracle jdeveloper 10.3.1.1
any ideas of what may be the problem ?… please help….
thanks.
Leo.
Riyad KallaMemberjava.lang.NoSuchMethodError: org.apache.commons.validator.ValidatorResources.<init>([Ljava/io/InputStream;)V at
That’s an API-mismatch error, meaning the version of commons validator that is being loaded is incompatible with some other lib.
It’s possible your app server already provides an older version and it’s conflicting with the one you are trying to use.
-
AuthorPosts