Java. Lang. illegalargumentexception: resources cannot be null

Source: Internet
Author: User

Java. Lang. illegalargumentexception: resources cannot be null.
Org. Apache. commons. validator. validator. <init> (validator. Java: 188)
Org. Apache. Struts. validator. Resources. initvalidator (resources. Java: 475)
Org. Apache. Struts. validator. validatorform. Validate (validatorform. Java: 104)
..............

 


I have never seen this problem before.

At first glance, you are lucky to find this article as long as you have found this problem.

This problem is simple and easy to solve.

Check the struts-config.xml first when this problem occurs

For example, if the form type is written as the action path, this error will be reported.

<Message-resources parameter = "com. jatty. Struts. applicationresources"/>
If it is correct, check whether your actionform inherits the validatorform, actionform, or other form parent classes.

It is because you configured the struts form, but you didn't configure the validate Method for her. You can use the validate method. As the saying goes, it's hard for a man to get rid of it. How can he do it with a porcelain, yes?

Another solution is to put validate = "false" in the struts-config.xml ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.