conn = dataSource.getConnection();
log.debug("Connection retrieved from pool");
} catch (Exception e) {
- log.error("Unable to fetch a connection from the pool");
+ log.error("JDBC Connector (" + getId() + ") unable to fetch a connection from the pool");
throw new ResolutionPlugInException("Unable to fetch a connection from the pool: " + e.getMessage());
}
if (conn == null) {
PreparedStatement preparedStatement = null;
try {
preparedStatement = conn.prepareStatement(searchVal);
+ preparedStatement.clearParameters();
statementCreator.create(preparedStatement, principal, requester, depends);
rs = preparedStatement.executeQuery();
if (!rs.next()) {
}
} catch (Exception e) {
- log.error("Encountered an error while creating prepared statement: " + e);
- throw new JDBCStatementCreatorException(
+ log.error("Encountered an error while creating prepared statement (principal=" + principal.getName() + "): " + e);
+ throw new JDBCStatementCreatorException(
"Encountered an error while creating prepared statement: " + e.getMessage());
}
}