日期:2014-05-17  浏览次数:20876 次

struts2表单提交时报错,希望牛人帮解决!
报错信息如下:
Java code


http-8080-5 - 2012-07-20 14:10:06,390 - DEBUG - com.opensymphony.xwork2.interceptor.StaticParametersInterceptor - Setting static parameters {} - 
http-8080-5 - 2012-07-20 14:10:06,390 - DEBUG - com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params NONE - 
http-8080-5 - 2012-07-20 14:10:06,390 - DEBUG - com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params ids => [ on ] message => [  ] waterType.id => [ 89 ] waterType.ratio => [ 166 ] waterType.sewageprice => [ 10 ] waterType.waterprice => [ 9 ] waterType.watertype => [ 爱我中签约1 ]  - 
http-8080-5 - 2012-07-20 14:10:06,390 - DEBUG - com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler - Entering nullPropertyValue [target=[com.opensymphony.xwork2.ActionSupport@15c19d7, com.opensymphony.xwork2.DefaultTextProvider@1b51db7], property=waterType] - 
ognl.OgnlException: target is null for setProperty(null, "id", [Ljava.lang.String;@1a4770d)
    at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1624)
    at ognl.ASTProperty.setValueBody(ASTProperty.java:105)
    at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
    at ognl.SimpleNode.setValue(SimpleNode.java:246)
    at ognl.ASTChain.setValueBody(ASTChain.java:172)
    at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
    at ognl.SimpleNode.setValue(SimpleNode.java:246)
    at ognl.Ognl.setValue(Ognl.java:476)
    at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192)
    at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:155)
    at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:143)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:273)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(D