getCommunityUser().getUserName());
stringBuilder.append(" life time - ").append(certificateCredential.getLifeTime());
log.error(stringBuilder.toString(), e);
throw new CredentialStoreException(stringBuilder.toString(), e);
} catch (UnsupportedEncodingException e) {
StringBuilder stringBuilder = new StringBuilder("Error persisting community credentials. Unsupported encoding.");
stringBuilder.append(" gateway - ").append(certificateCredential.getCommunityUser().getGatewayName());
stringBuilder.append(" community user name - ").append(certificateCredential.
getCommunityUser().getUserName());
stringBuilder.append(" life time - ").append(certificateCredential.getLifeTime());
log.error(stringBuilder.toString(), e);
throw new CredentialStoreException(stringBuilder.toString(), e);
} catch (IOException e) {
StringBuilder stringBuilder = new StringBuilder("Error persisting community credentials. Error serializing " +
"credentials.");
stringBuilder.append(" gateway - ").append(certificateCredential.getCommunityUser().getGatewayName());
stringBuilder.append(" community user name - ").append(certificateCredential.
getCommunityUser().getUserName());
stringBuilder.append(" life time - ").append(certificateCredential.getLifeTime());
log.error(stringBuilder.toString(), e);
throw new CredentialStoreException(stringBuilder.toString(), e);
} finally {
dbUtil.cleanup(preparedStatement, connection);
}
}