Summary of issues with the target is null for SetProperty

Source: Internet
Author: User

This problem has occurred, the error is

Com.opensymphony.xwork2.ognl.OgnlValueStack warn-error setting expression ' costrecord.yearmonth ' with value ' [ Ljava.lang.String, @d2877a '
Ognl. Ognlexception:target is null for setProperty (NULL, "Yearmonth", [Ljava.lang.String; @d2877a) search on the internet for a long time, did not find a solution, Online summary There are 5 kinds of possibilities, but have been checked, are not resolved.

1. The corresponding property does not have a Get Set method
2. There are more name attributes in the submission form and the corresponding action or model does not have this method (it is important to include a picture button that is often difficult to find) as shown below:
<input type= "image" Name= "submit" value= "submitted" onclick= "return Checkpwd ();" src= "Images/a_tj.gif"/> "
Error message: Target is null for setProperty (NULL, "X", [Ljava.lang.String; @b0c40e)
3. In the absence of spring help injection, the model in our action must be manually new and add an empty construction method inside the model.
4.Action inside the model instance object name is inconsistent with the name in our form
5. Also encountered is the mistake between our class name is very long time metaphor:
Pivate ABDEFGHJIJKLIJEJFJDKEIFJ ABEFGHJIJKLIJEJFJDKEIFJ Then if we use MyEclipse to automatically add the Get set method, we will find its getab (); And we're actually going to be getab ();


my mistake was that the requested URL was written incorrectly and asked for another action.

despise me.

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.