问题描述
在 IBM WebSphere 服务器上托管的 Java 应用程序的正常使用过程中经常出现以下异常.
Getting following exception frequently during normal usage from my java application hosted on IBM WebSphere server.
: DSRA9420E: Connection cannot be reassociated because child objects are still open.
Exception from createCallableStatement(String query,int resultSetType,int resultSetConcurrency)
java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open.
at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:1699)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.activate(WSJdbcConnection.java:2933)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareCall(WSJdbcConnection.java:2652)
at dataInterface.CrossRefDbConnectionProvider.createCallableStatement(CrossRefDbConnectionProvider.java:154)
at dataInterface.CrossRefDbExecutionHelper.preparedCall(CrossRefDbExecutionHelper.java:168)
at Schneider.Competitor.doPost(Competitor.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1071)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:914)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA9420E: Connection cannot be reassociated because child objects are still open.
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:441)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reassociate(WSJdbcConnection.java:3045)
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.associateConnection(WSRdbManagedConnectionImpl.java:5141)
at com.ibm.ejs.j2c.MCWrapper.associateConnection(MCWrapper.java:2554)
at com.ibm.ejs.j2c.ConnectionManager.reassociateConnectionHandle(ConnectionManager.java:2949)
at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java:2931)
at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java:2813)
at com.ibm.ws.rsad
请帮我找出这个异常的根本原因,我该如何解决
Please help me to find the root cause this exception and how can i fix that
提前致谢
推荐答案
应用程序是否从多个线程访问 JDBC 连接和/或从中获取的资源(语句、结果集...)?鉴于堆栈,这是我能想到的关于如何进入这种状态的唯一解释.如果是这样,JDBC 不支持这种用法,并且需要更新应用程序以避免跨不同线程使用连接及其语句、结果集……等等.
Is the application accessing a JDBC connection and/or the resources obtained from it (statements, result sets,...) from multiple threads? Given the stack, that's the only explanation I can think of for how to get into this state. If so, that sort of usage isn't supported by JDBC and the application would need to be updated to avoid using a connection and its statements, result sets, ... and so on across different threads.
这篇关于无法重新关联连接,因为子对象仍处于打开状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!