Hi!
I don’t know a root cause of ‘JDBC PreparedStatement NOT CLOSED’ error.
========================== JENNIFER 3.2 Message ================================
60 48.8%
/Sale/CreditSaleStatus.jsp JDBC PreparedStatement NOT CLOSED
sql:[SELECT ISNULL,0) AS SAL_AMT, ISNULL,0) AS SAL_VAT, ISNULL,0) AS COL_AMT FROM SL100V01 WHERE CONVERT, SAL_DT, 112) = ? AND CUST_CD = ? ][],
pstmt created
public java.sql.PreparedStatement < init >
public PreparedStatement java.sql.Connection.prepareStatement(String)
================================================================================
And here is attached file including method information from CreditSaleStatus.jsp page with TXT type.
PreparedStatement is using cleanup method,
/**
* Connection, PreparedStatement, ResultSet을 Close한다.
* @param conn Connection (Connection from connection pool)
* @param pstmt PreparedStatement (PreparedStatement)
* @param rs ResultSet (Data result set)
* @return Initialize connection-based data.
* @exception
*/
public static void cleanup( Connection conn, PreparedStatement pstmt, ResultSet rs ) {
try {
if (rs != null) rs.close();
} catch (Exception e) {
e.printStackTrace();
}
try {
if (pstmt != null) pstmt.close();
} catch (Exception e) {
e.printStackTrace();
}
}
try {
if (conn != null) conn.close();
} catch (Exception e) {
e.printStackTrace();
}
I closed PreparedStatement like the above way, so I can’t understand why JENNIFER sends such alert message. Even I see same message in terms of ResultSet.
Did I make some mistake when I close PreparedStatement? |