Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.Physica
2013-12-06 17:55
549 查看
产生这个错误的原因是因为我的oracle数据库中有一个CLOB字段,查询出来的时候要转换为JSON而报错。
Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.PhysicalConnection with modifiers "public"
取出来的JSON数据是这样的
TEXT=oracle.sql.CLOB@40a04430因为它无法转成json
处理方法网上查了一大堆,大部分都是说Json Plugin会序列化整个Action
在<result type="json"></result>中添加includeProperties和excludeProperties过滤掉不需要被序列号的属性。觉得有些复杂,可能还要用一些正则之类的。而我不需要过滤,而是正需要那个CLOB值。
解决办法是在oracle取数据的时候就直接将CLOB转换成varchar2类型
TO_CHAR(text)
Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.PhysicalConnection with modifiers "public"
取出来的JSON数据是这样的
[{STATE=0, REUSER=a, ANONYMIS=否, TEXT=oracle.sql.CLOB@40a04430, CHANNELTYPE=用户交互, ID=1111, OPENIS=是}]
TEXT=oracle.sql.CLOB@40a04430因为它无法转成json
处理方法网上查了一大堆,大部分都是说Json Plugin会序列化整个Action
在<result type="json"></result>中添加includeProperties和excludeProperties过滤掉不需要被序列号的属性。觉得有些复杂,可能还要用一些正则之类的。而我不需要过滤,而是正需要那个CLOB值。
解决办法是在oracle取数据的时候就直接将CLOB转换成varchar2类型
TO_CHAR(text)
相关文章推荐
- Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.Physica
- Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.Physica
- Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.Physica
- Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.Physica
- Class org.apache.struts2.json.JSONWriter can not access a member of *(转)
- Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
- org.apache.struts2.json.JSONWriter can not access a member of class
- Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.in
- Class org.apache.struts2.json.JSONWriter can not access a member of class
- Class org.apache.struts2.json.JSONWriter can not access a member of *
- 解决json结合struts2时,Class org.apache.struts2.json.JSONWriter can not access a member of * 的问题
- Class org.apache.struts2.json.JSONWriter can not access a member of *
- org.apache.struts2.json.JSONWriter can not access a member of class org.apache.commons.dbcp...
- org.apache.struts2.json.JSONWriter can not access a member of class
- Class org.apache.struts2.json.JSONWriter can not access a member of *
- Class org.apache.struts2.json.JSONWriter can not access a member of
- 使用json-lib-2.1.jar报,org.apache.struts2.json.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSourc
- org.apache.struts2.json.JSONWriter can not access a member of class
- org.apache.struts2.json.JSONWriter can not access a member of class
- org.apache.struts2.json.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingD