Ognl. Ognlexception:target is null for setProperty (NULL, "XXXX" ...)

Source: Internet
Author: User

Today, I met this wonderful problem, and then I went back and forth to find out the problem after a complete code written by a predecessor.

The error is probably described as:

Warning: Error setting expression ' XXX ' with value ' [Ljava.lang.string;@1cb2dd1 '
Ognl. Ognlexception:target is null for setProperty (NULL, "XXX", [Ljava.lang.string;@1cb2dd1)
At OGNL. Ognlruntime.setproperty (ognlruntime.java:2219)

Specific reasons I am not particularly clear, just from the wrong hint can be knows, may cause the cause of this error will be more, the code is interlocking, any link error will fall short, then master every link finally certainly will not have a problem.

Link One: Front desk

(1) The input value will be received from the JSP interface

<input type = "text" name = "Condition.querytype" >
(2) Link form pass-through value

<a href= "manage/patient!querypatient.action?condition.querytype = FirstPage" >
Be sure: the form of Condition.querytype is an instance of a class. property. Like User.Name and so on.

Link two: Condition Class and Action class

Be sure: All the attributes in this two class must have a get and set method.


At present I know these two links, grasp the good can solve this problem.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ognl. Ognlexception:target is null for setProperty (NULL, "XXXX" ...)

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.