`
beyondyl
  • 浏览: 8029 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

java.sql.SQLException: Attempted to use Connection after closed() was called.

阅读更多

JDWP exit error JVMTI_ERROR_NONE(0): getting frame location [../../../src/share/back/stepControl.c:623]
2011-07-30 12:12:01.906 WARN  [http-8088-Processor24] ConnectionManager.closeConnection (ConnectionManager.java:158) - Attempted to use Connection after closed() was called.
java.sql.SQLException: Attempted to use Connection after closed() was called.
 at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.assertOpen(ConnectionImpl.java:140)
 at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.setAutoCommit(ConnectionImpl.java:414)
 at com.young.uitl.database.ConnectionManager.closeConnection(ConnectionManager.java:153)
 at com.young.uitl.database.Database.executeUpdate(Database.java:41)
 at com.young.uitl.database.Database.update(Database.java:150)
 at com.young.struts.dao.GdzcDAO.tobeconfirmed(GdzcDAO.java:1320)
 at com.young.dwr.DWRService.tobeconfirmed(DWRService.java:1575)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
 at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
 at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
 at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
 at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
 at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
 at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
 at java.lang.Thread.run(Thread.java:619)
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d439053, pid=1784, tid=2404
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode windows-x86)
# Problematic frame:
# C

 

 

具体记不清楚了,就是在java代码里有一条update语句执行时报错 Attempted to use Connection after closed() was called.

1.发现数据库连接代码也没有错,而且update语句在数据库中执行正确。

2.设置断点调试,发现执行到运行sql语句时断点不执行,向控制台输出不了sql语句。

3.发现pl/sql里使用了select 表A for update,而且A表正是我java代码里更新的表;

所以只要断开与pl/sql连接即可。

 

1
2
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics