无法重新关联连接,因为子对象仍处于打开状态

时间:2016-12-01 05:02:11

标签: java oracle websphere

在IBM WebSphere服务器上托管的Java应用程序的正常使用期间经常获取以下异常。

     : 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

请帮我找到导致此异常的根本原因以及如何解决该问题

提前致谢

1 个答案:

答案 0 :(得分:1)

应用程序是否从多个线程访问JDBC连接和/或从中获取的资源(语句,结果集......)?鉴于堆栈,这是我能想到如何进入这种状态的唯一解释。如果是这样,JDBC不支持这种用法,并且需要更新应用程序以避免在不同的线程上使用连接及其语句,结果集......等等。