- 浏览: 67527 次
- 性别:
- 来自: 西安
文章分类
最新评论
-
zhengyong7232:
请问 myscret.key 怎么产生的啊?
java AES加密 -
ld3838029:
可以下载,非常感谢
ext-3.3.1下载地址 -
liancl:
非常感谢,可以下载
ext-3.3.1下载地址 -
liuxh3:
thank you very much! 可以下载
ext-3.3.1下载地址 -
timeflowing:
...
jquery验证输入非数字(无法输入数字)
SSH 整合时 json报错 java.sql.SQLException: Positioned Update not supported
- 博客分类:
- ssh整合知识
文章分类:Java编程 关键字: positioned update not supported异常解决备忘
今天在SSH项目中遇到运用JSON插件,产生如下异常:
该异常有两种解决方法:
第一:在struts.xml文件的配置中排除不要被JSON序列化的属性,例如:
其中functionsService就是不要被JSON序列化的属性。
第二:在Action文件中去除不要被JSON序列化的属性的get()方法,例如:
这样做functionsService同样不会被JSON序列化。
Java代码
- 2008-11-15 12:58:21 org.apache.catalina.core.StandardWrapperValve invoke
- 严重: Servlet.service() for servlet default threw exception
- java.sql.SQLException: Positioned Update not supported.
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
- at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
- at com.mysql.jdbc.ResultSetImpl.getCursorName(ResultSetImpl.java:2050)
- at com.mchange.v2.c3p0.impl.NewProxyResultSet.getCursorName(NewProxyResultSet.java:545)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:224)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321)
- at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225)
- at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157)
- at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123)
- at com.googlecode.jsonplugin.JSONWriter.write(JSONWriter.java:91)
- at com.googlecode.jsonplugin.JSONUtil.serialize(JSONUtil.java:90)
- at com.googlecode.jsonplugin.JSONResult.execute(JSONResult.java:173)
- at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
- at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
- at zz.WebNews.util.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:62)
- at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
- at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
- at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
- at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
- at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
- at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
- at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at zz.WebNews.util.AuthFilter.doFilter(AuthFilter.java:62)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
- at java.lang.Thread.run(Unknown Source)
2008-11-15 12:58:21 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet default threw exception java.sql.SQLException: Positioned Update not supported. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.ResultSetImpl.getCursorName(ResultSetImpl.java:2050) at com.mchange.v2.c3p0.impl.NewProxyResultSet.getCursorName(NewProxyResultSet.java:545) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:224) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.add(JSONWriter.java:321) at com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:225) at com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:157) at com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:123) at com.googlecode.jsonplugin.JSONWriter.write(JSONWriter.java:91) at com.googlecode.jsonplugin.JSONUtil.serialize(JSONUtil.java:90) at com.googlecode.jsonplugin.JSONResult.execute(JSONResult.java:173) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at zz.WebNews.util.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:62) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at zz.WebNews.util.AuthFilter.doFilter(AuthFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)
该异常有两种解决方法:
第一:在struts.xml文件的配置中排除不要被JSON序列化的属性,例如:
Java代码
- <action name="functions" class="getFunctionsAction" method="functions_getList">
- <result type="json">
- <param name="excludeProperties">functionsService</param>
- </result>
- </action>
<action name="functions" class="getFunctionsAction" method="functions_getList"> <result type="json"> <param name="excludeProperties">functionsService</param> </result> </action>
其中functionsService就是不要被JSON序列化的属性。
第二:在Action文件中去除不要被JSON序列化的属性的get()方法,例如:
Java代码
- public IFunctionsService getFunctionsService() {
- return functionsService;
- }
public IFunctionsService getFunctionsService() { return functionsService; }
这样做functionsService同样不会被JSON序列化。
发表评论
-
Struts2 Spring Hibernate Extjs 整合简单用例,extjs代码已经经过优化
2011-02-14 20:52 1785Action部分,这个部分关于id的处理很不好,但愿有同志能看 ... -
ssh整合时遇到问题集合
2011-02-14 20:11 1100一. ssh extjs整合时候 在action中不可以写服务 ... -
Struts2SpringHibernate 整合全过程(annotation版本)
2010-12-07 16:57 1288加包就不必说了特别说明的是需要添加一个struts2-spri ... -
王勇的配置
2009-11-25 12:59 848applicationContext-actions.xml ... -
ssh整合配置struts2.x配置
2009-11-10 19:38 965struts.xml <?xml version=&qu ...
相关推荐
在Java编程中,`java.sql.SQLException: 结果集已耗尽` 是一个常见的错误提示,通常出现在处理数据库查询结果集时。这个异常表明程序试图访问已经没有数据的结果集中下一行,即所有行已经被遍历完,尝试访问超出范围...
java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK ……
import java.sql.SQLException; ``` 3. **注册驱动**:在使用MySQL驱动前,需要通过`Class.forName()`方法注册驱动。尽管在较新的JDBC版本中这个步骤可以省略,但为了兼容性,很多示例代码仍然包含它: ```java ...
标题中的“Caused by: java.sql.SQLException: JZ0SJ: 没有在此数据库中发现元数据存取器信息。 请按 jConnect 文档中所述安装”是一个典型的错误信息,表明在尝试使用Java数据库连接(JDBC)驱动程序访问数据库时...
在oracle里面运行一下,解决Exception java.sql.SQLException ORA-00600 内部错误代码
8. **异常处理**:在处理数据库操作时,必须捕获SQLException和其他可能的异常,进行合适的错误处理和日志记录。 9. **安全性**:使用PreparedStatement防止SQL注入攻击,同时对敏感信息(如密码)进行加密存储和...
当你遇到"java.sql.SQLException: No suitable driver"这样的错误时,通常意味着你的Java环境无法找到匹配的数据库驱动。这个问题的解决方法是确保已经正确地引入了MySQL JDBC驱动(也称为Connector/J)。 MySQL ...
java.sql.SQLException: null, message from server: “Host ‘223.72.41.7’ is not allowed to connect to this MySQL server” 客户端访问时报错: 解决方法: 1,登陆服务器 mysql> use mysql; //用mysql ...
在Oracle数据库操作中,我们经常会遇到与`java.sql.SQLException`相关的异常。这个异常通常是Java应用程序在尝试与Oracle数据库进行交互时出现的问题。本篇将详细探讨`java.sql.SQLException`的各种常见类型及其解决...
Q: I am working with ... I am using updateBinaryStream method of resultset to update the BLOB field but it is failing after giving following exception java.sql.SQLException: Internal Error: Unable to
本文主要介绍了关于MySQL存储表情报错:java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x92\xA9\x0D\x0A…’的相关解决方法,分享出供大家参考学习,下面话不多说了,来一起看看详细的介绍: ...
主要给大家介绍了关于MySQL存储表情时报错:java.sql.SQLException: Incorrect string value: 'xF0x9Fx92xA9x0Dx0A...'的解决方法,文中通过示例代码介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 提示的是用户访问被拒绝,原因是密码不正确,但是我们明明配置的是正确的密码,原因就在yml中: spring: datasource: ...
### MySQL 数据库在 Spring Boot 项目中启动报错问题解析 #### 错误信息解读 在给定的信息中,我们注意到一个具体的错误信息:“com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error:...
java.sql.SQLException: Operation not allowed after ResultSet closed java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection should be passed in
当你尝试连接到MySQL数据库时,可能会遇到一个特定的异常:“java.sql.SQLException: The server time zone value ‘?й???????’ is unrecognized or represents more than one time zone”。这个错误表明服务器...
这里提到的问题是关于SQL操作时遇到的一个常见错误:“Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row:”,这个异常通常表明试图删除或更新的记录与数据库中...
绝对好用的9i驱动包+10g驱动包 解决java.sql.SQLException: 不支持的特性 解决oracle.jdbc.driver.OracleDatabaseMetaData.supportsGetGeneratedKeys()Z异常 等等
问题是这样的…我在VS2008直接运行打开网页,可以连接... 异常详细信息: System.Data.SqlClient.SqlException: 无法打开登录所请求的数据库 “TakeClass”。登录失败。 用户 ‘2D2727E2578F446\ASPNET’ 登录失败。