Caused by: No object in the CompoundRoot has a publicly accessible property named 'y' (no setter cou

                                                SSH相关问题


今天遇到一个奇葩问题

错误消息:

Caused by: No object in the CompoundRoot has a publicly accessible property named 'y' (no setter could be found). - [unknown location]
at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:106)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2332)
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:224)
at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:187)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:174)
... 54 more


网上查了有的说是不同包下Action重名了,但并不重名。

原因:原来我的struts.xml里配置成开发者模式,启动运行时就会出现这种问题。

<!-- 配置为开发模式 -->
    <constant name="struts.devMode" value="true" />

解决方法:

将以上配置改为false即可。



你可能感兴趣的:(Caused by: No object in the CompoundRoot has a publicly accessible property named 'y' (no setter cou)