产生这个错误的原因是因为我的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. CSharp设计模式读书笔记(10):装饰模式(学习难度:★★★☆☆,使用频率:★★★☆☆)

    装饰模式(Decorator Pattern): 动态地给一个对象增加一些额外的职责,就增加对象功能来说,装饰模式比生成子类实现更为灵活. 模式角色与结构: 示例代码: using System; u ...

  2. android ndk通过遍历和删除文件

           在做移动开发过程,难免有些本地文件管理操作.例如,很常见app随着微博.微信要清除缓存功能,此功能是走app文件夹.然后删除所有缓存文件.使用java的File类能够实现本地文件遍历及删 ...

  3. C++中避免内存泄露常见的解决方式

    常见内存泄露及解决方式-选自ood启发录 new/delete, array new/arrray delete匹配 case 1: 在类的构造函数与析构函数中没有匹配地调用 new/delete! ...

  4. C++中public,protected,private访问

    对于公有继承方式: (1)父类的public成员成为子类的public成员,允许类以外的代码访问这些成员:(2)父类的private成员仍旧是父类的private成员,子类成员不可以访问这些成员:(3 ...

  5. MVC 6 写法

    MVC 6 一些不晓得的写法 今天在看 Scott Guthrie 的一篇博文<Introducing ASP.NET 5>,在 MVC 6 中,发现有些之前不晓得的写法,这边简单记录下, ...

  6. Java设计模式偷跑系列(六)Singleton模式的建模与实现

    转载请注明出处:http://blog.csdn.net/lhy_ycu/article/details/39784403 单例模式(Singleton):是一种经常使用的设计模式. 在Java应用中 ...

  7. Linux下tomcat管理查看控制台|杀死tomcat进程

    查看控制台 # tail -f catalina.out 脚本执行权限chmod u+x *.sh #看是否已经有tomcat在运行了 ps -ef |grep tomcat #如果有,用kill; ...

  8. high performance program (SSE4.2 intrin instruction)

    In file included from mm_lddqu.si128.c:2:0: /usr/local/lib/gcc/x86_64-redhat-linux/4.7.1/include/nmm ...

  9. VC++.Net CAD编程架构

    1.每个对应的菜单项的图形抽象的, 图形抽象基类, 取决于改变来自子(如矩形.椭圆形) 2.在Doc对象管理列表管理,图形对象,当图形需要重绘或序列存储,通过遍历该列表的对象可以是 3. 每个类的职责 ...

  10. PHP 3:从Login界面谈PHP标记

    原文:PHP 3:从Login界面谈PHP标记 前一篇文章简要介绍了此实例.OK,我们就从第一个页面Login页面入手吧.还是看看界面怎么样,是不是很想指导它到底是如何实现的呢?好的,看看其代码吧: ...