首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

target is null for setProperty(null, "name" [Ljava.lang.String;@ffc6ae

2012-09-27 
target is null for setProperty(null, name, [Ljava.lang.String@ffc6ae)如题 target is null for set

target is null for setProperty(null, "name", [Ljava.lang.String;@ffc6ae)
如题 target is null for setProperty(null, "name", [Ljava.lang.String;@ffc6ae)

严重: Could not create and/or set value back on to object
Method "setProductType" failed for object net.epsshop.action.admin.ProductTypeAction@163bad4 - Class: ognl.OgnlRuntime
File: OgnlRuntime.java
Method: callAppropriateMethod
Line: 1265 - ognl/OgnlRuntime.java:1265:-1

ognl.MethodFailedException: Method "setProductType" failed for object net.epsshop.action.admin.ProductTypeAction@163bad4 [java.lang.NoSuchMethodException: net.epsshop.action.admin.ProductTypeAction.setProductType($Proxy39)]

警告: Error setting expression 'productType.name' with value '[Ljava.lang.String;@ffc6ae'

get和set方法都有
这个破问题困扰我一天,以前遇到过,又忘了。。。(哎,人老了记性不太好了)

解决:


private ProductType productType ;
改成
private ProductType productType = new ProductType(); //初始化(其实我到现在都郁闷,以前都是没有初始化怎么都没出错,有高手路过的,知道原因的请告诉在下,谢谢了!)

热点排行