X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FGroup.java;fp=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FGroup.java;h=be4c6409e47297dd99c733fd14a1310889f8f75b;hb=9730517e01a5c8d866f6c0d8e9051a92ccf29dd6;hp=8904765aeb905697dae0157f00e7a0449b98e2eb;hpb=bb01feceff0527c8f63ad513d85975e5c4e2e52f;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java index 8904765a..be4c6409 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java @@ -46,6 +46,7 @@ public class Group extends Syncable { private static EELFLogger intlogger = EELFManager.getInstance().getLogger("InternalLog"); private static int next_groupid = getMaxGroupID() + 1; + private static final String SQLEXCEPTION = "SQLException: "; private int groupid; private String authid; @@ -107,7 +108,7 @@ public class Group extends Syncable { } db.release(conn); } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error("PROV0009 getGroupsForSQL: " + e.getMessage(), e); } return list; } @@ -127,7 +128,7 @@ public class Group extends Syncable { } db.release(conn); } catch (SQLException e) { - intlogger.info("getMaxSubID: " + e.getMessage()); + intlogger.info("PROV0001 getMaxSubID: " + e.getMessage(), e); } return max; } @@ -150,7 +151,7 @@ public class Group extends Syncable { } db.release(conn); } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error("PROV0002 getGroupsByClassfication: " + e.getMessage(), e); } return list; } @@ -175,7 +176,7 @@ public class Group extends Syncable { } db.release(conn); } catch (SQLException e) { - intlogger.warn("PROV0008 countActiveSubscriptions: " + e.getMessage()); + intlogger.warn("PROV0008 countActiveSubscriptions: " + e.getMessage(), e); } return count; } @@ -229,7 +230,8 @@ public class Group extends Syncable { } catch (InvalidObjectException e) { throw e; } catch (Exception e) { - throw new InvalidObjectException("invalid JSON: " + e.getMessage()); + intlogger.warn("Invalid JSON: " + e.getMessage(), e); + throw new InvalidObjectException("Invalid JSON: " + e.getMessage()); } } @@ -346,14 +348,14 @@ public class Group extends Syncable { ps.close(); } catch (SQLException e) { rv = false; - intlogger.warn("PROV0005 doInsert: " + e.getMessage()); + intlogger.warn("PROV0005 doInsert: " + e.getMessage(), e); } finally { try { if (ps != null) { ps.close(); } } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage(), e); } } return rv; @@ -375,14 +377,14 @@ public class Group extends Syncable { ps.executeUpdate(); } catch (SQLException e) { rv = false; - intlogger.warn("PROV0006 doUpdate: " + e.getMessage()); + intlogger.warn("PROV0006 doUpdate: " + e.getMessage(), e); } finally { try { if (ps != null) { ps.close(); } } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage(), e); } } return rv; @@ -399,14 +401,14 @@ public class Group extends Syncable { ps.execute(); } catch (SQLException e) { rv = false; - intlogger.warn("PROV0007 doDelete: " + e.getMessage()); + intlogger.warn("PROV0007 doDelete: " + e.getMessage(), e); } finally { try { if (ps != null) { ps.close(); } } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage(), e); } } return rv;