Guest User

CallableStatement cstmt = null;
ResultSet rs = null;
String query = “{call procedure_name(?, ?, ?)}”;
try {
cstmt = conn.prepareCall(query);
cstmt.setString(1, ’……… cstmt.registerOutParameter(n, OracleTypes.CURSOR); cstmt.excute(); rs = (ResultSet)cstmt.getObject(n); // Common variable cast on the screen. SetGauceDataSet(dataSet, rs, res);
} catch(SQLException sqle) {
sqe.printStackTrace();
} catch(Exception e) {
e.printStaceTrace();
} finally {
try {
if(rs != null) rs.close();
if(cstmt != null) cstmt.close();
} catch(SQLException sqle) {
sqle.printStackTrace();
}
}
The source code is as shown above. It was simplified to show the overall structure.
In my opinions, the CallableStatement object is closed in “finally”, but..
on the JENNIFER alarm screen, I see the message saying, “JDBC CallableStatement not closed”.
I am curious why I am getting this message.

Khalid Saeed

Maybe multiple sessions of cstmt are created in one application?
Can you upload the source, please?
Or, send me an email at nomin@jennifersoft.com.