Struts2 JSON Plugin 异常

org.apache.struts2.json.JSONException:java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.PhysicalConnection with modifiers "public"
        org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:243)
        org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
        org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
        org.apache.struts2.json.JSONWriter.write(JSONWriter.java:99)
        org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:112)
        org.apache.struts2.json.JSONResult.execute(JSONResult.java:198)
       
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:
362)

很简单的问题,但是Google了一下很多没有给出正确的答案

Json Plugin会序列化整个Action, 但是Dao无法序列化.
<result name="success" type="json" >
	<param name="excludeProperties"> 
		  dbManager
	</param>
</result>


exclude无法序列化的部分就可以了

你可能感兴趣的:(java,apache,oracle,bean,json)