Make sure the PreparedStatement is scoped outside of the try block so that it can be closed in the finally *before* the connection is released.