aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-09-18 11:47:20 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-09-18 11:47:20 +0530
commit5e2aa1fec3c51e8eb0e6b43285c8414105a51b2f (patch)
tree291e6a39ce0cf6e9b0e60c5645fa816226c3c974 /adapters/mso-catalog-db-adapter
parent5d8490e4c2aabebe4e34a28bc47a42a17fbfa1f1 (diff)
Fixed Issues In adapter code.
Issue-Id : SO-141 Change-Id: I0e901537013634dfc3f0950921c2ebbc2afa411f Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'adapters/mso-catalog-db-adapter')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java2
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java7
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java2
3 files changed, 9 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java
index 7fe8892ee8..6c7d584f6d 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQuery.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,6 +74,7 @@ public abstract class CatalogQuery {
jsonString = mapper.writeValueAsString(this);
}
catch (Exception e) {
+ LOGGER.debug("Exception:", e);
LOGGER.debug ("jsonString exception:"+e.getMessage());
jsonString = "invalid"; //throws instead?
}
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java
index 2407581f55..9f709140ec 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/CatalogQueryExceptionCommon.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,9 +26,11 @@ import org.codehaus.jackson.map.SerializationConfig;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import java.io.ByteArrayOutputStream;
+import org.openecomp.mso.logger.MsoLogger;
public abstract class CatalogQueryExceptionCommon {
private String messageId;
+ protected static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
public CatalogQueryExceptionCommon() { messageId = null; }
public CatalogQueryExceptionCommon(String messageId) { this.messageId = messageId; }
@@ -43,7 +46,7 @@ public abstract class CatalogQueryExceptionCommon {
jsonString = mapper.writeValueAsString(this);
return jsonString;
} catch (Exception e) {
- e.printStackTrace();
+ LOGGER.debug ("Exception:", e);
return "";
}
}
@@ -57,7 +60,7 @@ public abstract class CatalogQueryExceptionCommon {
marshaller.marshal(this, bs);
return bs.toString();
} catch (Exception e) {
- e.printStackTrace();
+ LOGGER.debug ("Exception:", e);
return "";
}
}
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java
index f687aca683..3ffb0c6744 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModules.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -74,6 +75,7 @@ public class QueryVfModules {
LOGGER.debug ("QueryVfModules jsonString: "+jsonString);
}
catch (Exception e) {
+ LOGGER.debug ("Exception:", e);
LOGGER.debug ("QueryVfModules jsonString exception:"+e.getMessage());
}
return jsonString;