facebook

error using validator framework with struts

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #235829 Reply

    jacksparsoo
    Member

    Hi,

    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 found

    after 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

    #235859 Reply

    Hermod Opstvedt
    Participant

    Hi

    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

    #235882 Reply

    Riyad Kalla
    Member

    Guys,
    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?

    #236173 Reply

    jacksparsoo
    Member

    Thanks 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.

    #274530 Reply

    leomendez81
    Member

    Hi 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.

    #274531 Reply

    Riyad Kalla
    Member

    java.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.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: error using validator framework with struts

You must be logged in to post in the forum log in