We are using Spring & Hibernate on a WebLogic 9.1 & and and Oracle 9i database. Most of our queries work fine except one query which throws a Result Set closed when Hibernate attempts to fetch the child collection (Object C in schematic below).
All the operations are performed within a Transaction and so are within a single Hibernate Session.
It appears that WebLogic is automatically closing the Result Sets which Hibernate needs in order to fetch the child collection.
Partial Exception Stack Trace: Caused by: java.sql.SQLException: Thread Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] finds resultset already closed at Wed Apr 16 15:04:56 BST 2008 java.lang.Exception: Originally closed by Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] at Wed Apr 16 15:04:54 BST 2008 at weblogic.jdbc.wrapper.ResultSet.internalClose(ResultSet.java:133) at weblogic.jdbc.wrapper.Statement.closeAllResultSets(Statement.java:204) at weblogic.jdbc.wrapper.Statement.internalClose(Statement.java:309) at weblogic.jdbc.wrapper.Statement.internalClose(Statement.java:281) at weblogic.jdbc.wrapper.Connection.closeAllStatements(Connection.java:364) at weblogic.jdbc.wrapper.JTAConnection.closeAllStatements(JTAConnection.java:154) at weblogic.jdbc.wrapper.JTAConnection.releaseXAConnIfNeeded(JTAConnection.java:228) at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:197) at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:68) at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:256) at weblogic.jdbc.wrapper.Statement.doClose(Statement.java:348) at weblogic.jdbc.wrapper.Statement.close(Statement.java:335) at weblogic.jdbc.rmi.internal.StatementImpl.close(StatementImpl.java:125) at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_T4CPreparedStatement_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:550) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:440) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:436) at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:58) at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:975) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
Is there more to that exception stack trace. I feel like I should be seeing a root cause there "caused by" Check the log file to see if there is more in there, rather than what appeared in a console window. If so, please post it. Are you using JPA? Are you no longer in a transaction? Is the Session now closed.
We are not using JPA. The whole operation is within a single method which is wrapped by a Spring Transactional Proxy and so should be within a single XA transaction and a the Hibernate Session should be open for the duration of the method call.
That looks more like a Weblogic issue than an ORM or Hibernate problem. All the classes are in the Weblogic packages.
I am going to move this to the Weblogic forum.
Thanks
Mark
Andrew Bowes
Greenhorn
Joined: Apr 18, 2005
Posts: 6
posted
0
Thanks Mark. Looks like this issue is a hot-potato, this is the 3rd forum that it's been on
I think that the issue may be related to the use of connections from a WebLogic Datasource on an Oracle XA connection pool used with a jUnitTest Case.
Avinash Shahdadpuri
Greenhorn
Joined: Feb 25, 2009
Posts: 1
posted
0
Andrew,
We are facing exact same issue on weblogic with hibernate. We see this at heavy load. Once this exception occurs, lot of hibernate collection loads cause the same exception.
Did you ever figure out, what was going around?
If yes, please let me know.
sridhar addanki
Greenhorn
Joined: Mar 04, 2009
Posts: 22
posted
0
Hi,
I am new to Hibernate and Weblogic 10.3. I have installed weblogic 10.3. Developers want use Hibernate in their application. For this any thing need to be done at Weblogic server level. I mean any configuration need to be done.