产生这个错误的原因是因为我的oracle数据库中有一个CLOB字段,查询出来的时候要转换为JSON而报错。


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>中添加includePropertiesexcludeProperties过滤掉不需要被序列号的属性。觉得有些复杂,可能还要用一些正则之类的。而我不需要过滤,而是正需要那个CLOB值。
解决办法是在oracle取数据的时候就直接将CLOB转换成varchar2类型
TO_CHAR(text)

Class org.apache.struts2.json.JSONWriter can not access a member of class oracle.jdbc.driver.Physica的更多相关文章

  1. 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 com.googlecode. ...

  2. Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"

    Spring注入Action使用Json错误:org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: ...

  3. 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.tomcat.dbcp.db ...

  4. 解决json结合struts2时,Class org.apache.struts2.json.JSONWriter can not access a member of * 的问题

    在使用json的时候,产生的一个错误,查了一下资料,原来是struts2和json一起使用的时候,才产生的问题,虽然不影响程序的运行,但是总是会有一些异常的日志产生,并且,这个也会增加程序的负担. 原 ...

  5. struts2 java.lang.StackOverflowError org.apache.struts2.json.JSONWriter

    1. 问题描述: 页面通过异步访问action,    action的方法通过map封装数据,struts的result的type设置为json,后台报错 六月 25, 2016 6:54:33 下午 ...

  6. Struts2 项目 Action 查询结果异常 org.apache.struts2.json.JSONException

    问题描述 今天进行一个订单管理模块的开发时遇到一个问题:查询的订单时有时会报这个异常: org.apache.struts2.json.JSONException: java.lang.Illegal ...

  7. Oozie时出现org.apache.oozie.service.ServiceException: E0103: Could not load service classes, Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

    不多说,直接上干货! 问题详情 查看你的$OOZIE_HOME/logs 我的是/home/hadoop/app/oozie-4.1.0-cdh5.5.4/logs/oozie.log文件 [hado ...

  8. root cause:org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException

    今天在调试SSH与Ajax时,服务器端报出JSON异常:

  9. EXT4+Struts2 JSON的问题

    ERROR : Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframewor ...

随机推荐

  1. STL之sort函数的用法

    说明:本文仅供学习交流,转载请标明出处,欢迎转载! STL封装了一个排序算法,该算法相应的头文件为#include<algorithm>,我们能够依据须要对一个数组进行排序或者降序. so ...

  2. vb.net窗口继承(房重建知识汇总)

    在项目的开发,我们经常会遇到特殊的相界面似窗户,然后,我们将能够使用继承的窗口.透过窗户下面简单的例子来实现继承. 1.创建父窗口Form1 2.把须要重写的事件改为Overridable,将priv ...

  3. WebApi及Fiddler工具

    WebApi及Fiddler工具 1.概述 曾经有人问:asp.net mvc和asp.net webapi区别在哪?这个其实不好回答的.可能因为mvc模式盛行的原因,webapi显得孤芳自赏了,让人 ...

  4. [Elasticsearch] 邻近匹配 (一) - 短语匹配以及slop參数

    本文翻译自Elasticsearch官方指南的Proximity Matching一章. 邻近匹配(Proximity Matching) 使用了TF/IDF的标准全文搜索将文档,或者至少文档中的每一 ...

  5. C语言中嵌入式SQL语句

    原文:[转载]C语言中嵌入式SQL语句 http://blog.csdn.net/cnlht/archive/2007/12/12/1930960.aspx原文地址 实验内容: 掌握SQL Serve ...

  6. linux_shell 特殊符号的介绍

    linux_shell 特殊符号的介绍 2011-12-17 17:54:07 分类: 原文地址:linux_shell 特殊符号的介绍 作者:xu_liuzhen linux_shell 特殊符号的 ...

  7. 体验SubSonic

    体验SubSonic SubSonic简介 SubSonic配置 利用sonic.exe来生成代码 通过Substage来生成代码 简单操作示例 1.SubSonic简介 一句讲完就是:SubSoni ...

  8. win8安装tfs2010提示未启用iis6.0未启用兼容模式需要静态内容组件

    笔者的电脑由于安装TFS2010就提示这个错误,当时网上也没有很好地办法,重装iis组件也不行.如果你同样没有找到更好的办法,建议安装tfs2012,但在vs2010使用tfs2012是无法创建团队项 ...

  9. [转]JavaScript Namespaces and Modules

    Namespaces In most programming languages we know the concept of namespaces (or packages).Namespaces ...

  10. [转]当图片源大小大于ImageView大小时的处理方式(缩放)

    转一篇当图片源大小大于ImageView大小定死时的处理方法,但不适用于图片大小小于ImageView时的情况,因为inSampleSize不能<1, 谁有特别好的放大的解决方案,除了设置Ima ...