4 Replies Latest reply: Mar 28, 2013 5:11 AM by 791983 RSS

    java.sql.SQLException: Result set already closed

    882652
      Hi,

      Our application is getting migrated to weblogic 10.3.5 and java 1.6.

      We use Ibatis(2.3.0.677.jar) in our application, when i am running my application, I get below exception in weblogic 10.3.5 with TransactionManager as JNDI.

      NOTE: This applicaiton runs very well in weblogic 9.2. And I have even tried locally using the JUnit with transactionManager as SIMPLE which works well too.

      BFSCITWA170546|CSI_APP_ID_NA|ERROR |0|2011-09-06 18:02:16,464|[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'|AbstractMessageConsumerMdb.java|:- [System] Failed processing message - rolling back
      com.citi.eztop.ezengine.refactoring.common.exception.MessageProcessingException: DAOException received
           at com.citi.eztop.ezengine.refactoring.workpublishing.mdb.WorkPublisherQueueConsumerMDB.handleTextMessage(WorkPublisherQueueConsumerMDB.java:87)
           at com.citi.eztop.ezengine.refactoring.common.mdb.AbstractMessageConsumerMdb.onMessage(AbstractMessageConsumerMdb.java:163)
           at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
           at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.processOneMessage(NewJMSMessagePoller.java:282)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.run(NewJMSMessagePoller.java:120)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      Caused by: com.citi.eztop.ezengine.refactoring.common.exception.DAOException: Failed to queryForObject [WorkItem.getWorkItemById]
           at com.citi.eztop.ezengine.refactoring.common.persistence.sqlmapdao.BaseSqlMapDao.queryForObject(BaseSqlMapDao.java:60)
           at com.citi.eztop.ezengine.refactoring.common.persistence.sqlmapdao.WorkItemSqlMapDao.getWorkItemById(WorkItemSqlMapDao.java:15)
           at com.citi.eztop.ezengine.refactoring.workpublishing.businesslayer.WorkPublisher.process(WorkPublisher.java:73)
           at com.citi.eztop.ezengine.refactoring.workpublishing.mdb.WorkPublisherQueueConsumerMDB.handleTextMessage(WorkPublisherQueueConsumerMDB.java:83)
           ... 8 more
      Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
      --- The error occurred in com/citi/eztop/ezengine/refactoring/common/persistence/sqlmapdao/sql/WorkItem.xml.
      --- The error occurred while applying a result map.
      --- Check the WorkItem.workItemResultMap.
      --- The error happened while setting a property on the result object.
      --- Cause: java.sql.SQLException: Result set already closed
           at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
           at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
           at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
           at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
           at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
           at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:83)
           at com.citi.eztop.ezengine.refactoring.common.persistence.sqlmapdao.BaseSqlMapDao.queryForObject(BaseSqlMapDao.java:56)
           ... 11 more
      Caused by: java.sql.SQLException: Result set already closed
           at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:144)
           at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:97)
           at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source)
           at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at com.ibatis.common.jdbc.logging.ResultSetLogProxy.invoke(ResultSetLogProxy.java:47)
           at $Proxy78.next(Unknown Source)
           at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:380)
           at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:301)
           at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:190)
           at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
           at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
           ... 17 more

      Please help me to resolve this issue, as I am stuck with this.