Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » java.sql.SQLException: Closed Resultset: next(CloseResult Set for RefCurors on Tomcat)
java.sql.SQLException: Closed Resultset: next [message #1869717] Thu, 22 August 2024 14:21 Go to next message
Vaishnavi Parthasarathy is currently offline Vaishnavi ParthasarathyFriend
Messages: 1
Registered: August 2024
Junior Member
Hi ,

I have a webapp I am migrating from weblogic to tomcat.
I have the app deployed on the Tomcat, after adding the EclipseLink jars.

The JPA entities and the Database queries that get the result set work perfectly fine.
But I have few queries that invoke Oracle DB functions which return ref cursors. I am running into the below exception in such cases.

java.sql.SQLException: Closed Resultset: next
at oracle.jdbc.driver.InsensitiveScrollableResultSet.ensureOpen(InsensitiveScrollableResultSet.java:112)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:400)

Code snippet that is failing.

Query query = em.createNativeQuery("SELECT rse_parameter_calc.get_run_type_overview() from dual");
rs_lst =query.getResultList();
rs = rs_lst.get(0);
}
while (rs.next()) --> The code fails here.

The same code works perfectly fine weblogic.
I am using the same ojdb8 drivers in both the servers .Any pointers would be helpful
Re: java.sql.SQLException: Closed Resultset: next [message #1874437 is a reply to message #1869717] Tue, 07 January 2025 17:25 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 60
Registered: December 2021
Member
If you are able - debug the app to see if/when the connection might be being closed. I would bet configuration is very different and your connection is being closed before you are done with the cursor, where as it is kept open (maybe managed by Weblogic) in the case where it is working.
Previous Topic:java.lang.IllegalArgumentException: eclipselink.jta.controller
Next Topic:java.sql.SQLIntegrityConstraintViolationException: Duplicate entry when persisting an entity
Goto Forum:
  


Current Time: Fri Jan 17 12:20:47 GMT 2025

Powered by FUDForum. Page generated in 0.02530 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top