xwork2.ognl.OgnlValueStack] - Error setting expression ‘uploadFile‘

本文讨论了Struts2框架中遇到的一个OGNL表达式设置错误,问题源于前端form表单缺少了关键属性,导致上传文件失败。解决此问题需要检查并修正表单提交的方式和字段配置。
摘要由CSDN通过智能技术生成
2021-04-05 12:24:17,215 WARN [com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'uploadFile' with value '[Ljava.lang.String;@295e4af1'
ognl.MethodFailedException: Method "setUploadFile" failed for object com.tym.nursery.action.NotesAction@6b02fe16 [java.lang.NoSuchMethodException: com.tym.nursery.action.NotesAction.setUploadFile([Ljava.lang.String;)]
	at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1265)
	at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1454)
	at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)
	at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
	at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28)
	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2225)
	at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:65)
	at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2225)
	at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
	at ognl.SimpleNode.setValue(SimpleNode.java:301)
	at ognl.Ognl.setValue(Ognl.java:737)
	at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:161)
	at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:149)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276)
	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:237)
	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:237)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
	at com.ope
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值