From b517156fe337ea209effaf2645e6ad7497540ea7 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Mon, 7 Jul 2014 16:44:18 -0700 Subject: [PATCH] CLOUDSTACK-7039: don't log exception stackTrace when catch sql exception on system/admin user/account insert --- server/src/com/cloud/server/ConfigurationServerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index b66e52dcb09..7c3b5a52e86 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -464,7 +464,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when inserting system account ", ex); + s_logger.debug("Caught exception when inserting system account: " + ex.getMessage()); } // insert system user insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, user.default)" @@ -474,7 +474,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when inserting system user ", ex); + s_logger.debug("Caught SQLException when inserting system user: " + ex.getMessage()); } // insert admin user, but leave the account disabled until we set a @@ -491,7 +491,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when creating admin account ", ex); + s_logger.debug("Caught SQLException when creating admin account: " + ex.getMessage()); } // now insert the user @@ -502,7 +502,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); stmt.executeUpdate(); } catch (SQLException ex) { - s_logger.debug("Caught SQLException when inserting user ", ex); + s_logger.debug("Caught SQLException when inserting admin user: " + ex.getMessage()); } try {