ognl/ObjectPropertyAccessor.java:132:-1

struts2配置文件如下:
<result name="logoutlist" type="redirectAction">
    <param name="actionName">list</param>
    <param name="namespace">/main</param>
    <param name="blogId">${blogId}</param>
    <param name="supressEmptyParameters">true</param>
   </result>
運行時後臺出現瞭如下錯誤,但是前臺運行結果正常顯示:
2011-04-04 19:37:44,734 ERROR [com.opensymphony.xwork2.ObjectFactory] - Unable to set parameter [blogId] in result of type [org.apache.struts2.dispatcher.ServletActionRedirectResult]
Caught OgnlException while setting property 'blogId' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: ognl.ObjectPropertyAccessor
File: ObjectPropertyAccessor.java
Method: setProperty
Line: 132 - ognl/ObjectPropertyAccessor.java:132:-1
 at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392)
 at com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143)
 at com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflectionProvider.java:91)……
查看了一下兩個action的blogId的get/set方法都設置了,但是還是出現了這個問題
把ognl表達式去掉直接傳常量,同樣出現這樣的問題(所以我感覺不是ognl表達式的問題),到網上查了查,結果是:
You can ignore the exception(yeah I know it smells to the moon), or
increase the log level for the ObjectFactory, it is a bug in Struts
which was re-introduced in 2.1.6 (/facepalm)
呵呵~

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章