Merge "Correct the rest URI of VFC"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Thu, 14 Sep 2017 11:47:44 +0000 (11:47 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 14 Sep 2017 11:47:44 +0000 (11:47 +0000)
48 files changed:
.gitignore
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java
adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/BPRestCallback.java
adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterRest.java
adapters/mso-workflow-message-adapter/src/main/java/org/openecomp/mso/adapters/workflowmessage/WMAdapterUtils.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCController.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfResourceStructure.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
bpmn/MSOCommonBPMN/pom.xml
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoHandler.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/CamundaDBSetup.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/DecomposeJsonUtil.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
bpmn/MSOMockServer/pom.xml
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterDeleteMockTransformer.java
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterQueryMockTransformer.java
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterRollbackMockTransformer.java
bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterUpdateMockTransformer.java
bpmn/MSORESTClient/pom.xml
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
common/src/main/java/org/openecomp/mso/utils/UUIDChecker.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ManualTasks.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
pom.xml

index ae9adea..04bad35 100644 (file)
@@ -10,4 +10,5 @@ target
 *.log
 *.tmp
 packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql
-packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql
\ No newline at end of file
+packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas/MySQL-Requests-schema.sql
+/bin/
index a1cf7e1..8073c95 100644 (file)
@@ -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.
@@ -425,7 +426,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                     try {
                         LOGGER.debug("Current stack " + this.getOutputsAsStringBuilder(heatStack).toString());
                     } catch (Exception e) {
-                        LOGGER.debug("an error occurred trying to print out the current outputs of the stack");
+                        LOGGER.debug("an error occurred trying to print out the current outputs of the stack", e);
                     }
 
                     if ("CREATE_IN_PROGRESS".equals (heatStack.getStackStatus ())) {
@@ -578,7 +579,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
 
                                        } catch (MsoException me2) {
                                                // We got an exception on the delete - don't throw this exception - throw the original - just log.
-                                               LOGGER.debug("Exception thrown trying to delete " + canonicalName + " on a create->rollback: " + me2.getContextMessage());
+                                               LOGGER.debug("Exception thrown trying to delete " + canonicalName + " on a create->rollback: " + me2.getContextMessage(), me2);
                                                LOGGER.warn(MessageEnum.RA_CREATE_STACK_ERR, "Create Stack errored, then stack deletion FAILED - exception thrown", "", "", MsoLogger.ErrorCode.BusinessProcesssError, me2.getContextMessage());
                                        }
 
@@ -1178,7 +1179,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                                String str = this.convertNode((JsonNode) obj);
                                                inputs.put(key, str);
                                        } catch (Exception e) {
-                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode "+ key);
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode "+ key, e);
                                                //effect here is this value will not have been copied to the inputs - and therefore will error out downstream
                                        }
                                } else if (obj instanceof java.util.LinkedHashMap) {
@@ -1187,21 +1188,21 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                                String str = JSON_MAPPER.writeValueAsString(obj);
                                                inputs.put(key, str);
                                        } catch (Exception e) {
-                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap "+ key);
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap "+ key, e);
                                        }
                                } else if (obj instanceof Integer) {
                                        try {
                                                String str = "" + obj;
                                                inputs.put(key, str);
                                        } catch (Exception e) {
-                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Integer "+ key);
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Integer "+ key, e);
                                        }
                                } else {
                                        try {
                                                String str = obj.toString();
                                                inputs.put(key, str);
                                        } catch (Exception e) {
-                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Other "+ key +" (" + e.getMessage() + ")");
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Other "+ key +" (" + e.getMessage() + ")", e);
                                                //effect here is this value will not have been copied to the inputs - and therefore will error out downstream
                                        }
                                }
@@ -1237,7 +1238,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                                String str = params.get(key).toString();
                                                sb.append("\n" + key + "=" + str);
                                        } catch (Exception e) {
-                                               //non fatal
+                                               LOGGER.debug("Exception :",e);
                                        }
                                }
                        }
@@ -1251,9 +1252,9 @@ public class MsoHeatUtils extends MsoCommonUtils {
                        final String json = JSON_MAPPER.writeValueAsString(obj);
                        return json;
                } catch (JsonParseException jpe) {
-                       LOGGER.debug("Error converting json to string " + jpe.getMessage());
+                       LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
                } catch (Exception e) {
-                       LOGGER.debug("Error converting json to string " + e.getMessage());
+                       LOGGER.debug("Error converting json to string " + e.getMessage(), e);
                }
                return "[Error converting json to string]";
        }
@@ -1290,6 +1291,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                        String str = JSON_MAPPER.writeValueAsString(obj);
                                        sb.append(str + " (a java.util.LinkedHashMap)");
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :",e);
                                        sb.append("(a LinkedHashMap value that would not convert nicely)");
                                }                               
                        } else if (obj instanceof Integer) {
@@ -1297,6 +1299,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                try {
                                        str = obj.toString() + " (an Integer)\n";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :",e);
                                        str = "(an Integer unable to call .toString() on)";
                                }
                                sb.append(str);
@@ -1305,6 +1308,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                try {
                                        str = obj.toString() + " (an ArrayList)";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :",e);
                                        str = "(an ArrayList unable to call .toString() on?)";
                                }
                                sb.append(str);
@@ -1313,6 +1317,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                try {
                                        str = obj.toString() + " (a Boolean)";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :",e);
                                        str = "(an Boolean unable to call .toString() on?)";
                                }
                                sb.append(str);
@@ -1322,6 +1327,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                try {
                                        str = obj.toString() + " (unknown Object type)";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :",e);
                                        str = "(a value unable to call .toString() on?)";
                                }
                                sb.append(str);
@@ -1399,7 +1405,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                        String jsonString = lhm.toString();
                        jsonNode = new ObjectMapper().readTree(jsonString);
                } catch (Exception e) {
-                       LOGGER.debug("Unable to convert " + lhm.toString() + " to a JsonNode " + e.getMessage());
+                       LOGGER.debug("Unable to convert " + lhm.toString() + " to a JsonNode " + e.getMessage(), e);
                        jsonNode = null;
                }
                return jsonNode;
@@ -1450,7 +1456,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                        Set<HeatTemplateParam> paramSet = template.getParameters();
                        LOGGER.debug("paramSet has " + paramSet.size() + " entries");
                } catch (Exception e) {
-                       LOGGER.debug("Exception occurred in convertInputMap:" + e.getMessage());
+                       LOGGER.debug("Exception occurred in convertInputMap:" + e.getMessage(), e);
                }
                
                for (HeatTemplateParam htp : template.getParameters()) {
@@ -1497,7 +1503,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                try {
                                        anInteger = Integer.parseInt(integerString);
                                } catch (Exception e) {
-                                       LOGGER.debug("Unable to convert " + integerString + " to an integer!!");
+                                       LOGGER.debug("Unable to convert " + integerString + " to an integer!!", e);
                                        anInteger = null;
                                }
                                if (anInteger != null) {
@@ -1518,7 +1524,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                        try {
                                jsonNode = new ObjectMapper().readTree(jsonString);
                        } catch (Exception e) {
-                                       LOGGER.debug("Unable to convert " + jsonString + " to a JsonNode!!");
+                                       LOGGER.debug("Unable to convert " + jsonString + " to a JsonNode!!", e);
                                        jsonNode = null;
                        }
                        if (jsonNode != null) {
@@ -1542,7 +1548,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
                                        else
                                                newInputs.put(key, anArrayList);
                                } catch (Exception e) {
-                                       LOGGER.debug("Unable to convert " + commaSeparated + " to an ArrayList!!");
+                                       LOGGER.debug("Unable to convert " + commaSeparated + " to an ArrayList!!", e);
                                        if (alias)
                                                newInputs.put(realName, commaSeparated);
                                        else
index 1497e2d..dba52d4 100644 (file)
@@ -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.
@@ -281,7 +282,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                     try {
                        LOGGER.debug("Current stack " + this.getOutputsAsStringBuilder(heatStack).toString());
                     } catch (Exception e) {
-                       LOGGER.debug("an error occurred trying to print out the current outputs of the stack");
+                       LOGGER.debug("an error occurred trying to print out the current outputs of the stack", e);
                     }
 
 
@@ -378,6 +379,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                                        String str = JSON_MAPPER.writeValueAsString(obj);
                                        sb.append(str + " (a java.util.LinkedHashMap)");
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :", e);
                                        sb.append("(a LinkedHashMap value that would not convert nicely)");
                                }                               
                        } else if (obj instanceof Integer) {
@@ -385,6 +387,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                                try {
                                        str = obj.toString() + " (an Integer)\n";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :", e);
                                        str = "(an Integer unable to call .toString() on)";
                                }
                                sb.append(str);
@@ -393,6 +396,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                                try {
                                        str = obj.toString() + " (an ArrayList)";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :", e);
                                        str = "(an ArrayList unable to call .toString() on?)";
                                }
                                sb.append(str);
@@ -401,6 +405,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                                try {
                                        str = obj.toString() + " (a Boolean)";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :", e);
                                        str = "(an Boolean unable to call .toString() on?)";
                                }
                                sb.append(str);
@@ -410,6 +415,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                                try {
                                        str = obj.toString() + " (unknown Object type)";
                                } catch (Exception e) {
+                                       LOGGER.debug("Exception :", e);
                                        str = "(a value unable to call .toString() on?)";
                                }
                                sb.append(str);
@@ -426,9 +432,9 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
                        final String json = JSON_MAPPER.writeValueAsString(obj);
                        return json;
                } catch (JsonParseException jpe) {
-                       LOGGER.debug("Error converting json to string " + jpe.getMessage());
+                       LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
                } catch (Exception e) {
-                       LOGGER.debug("Error converting json to string " + e.getMessage());
+                       LOGGER.debug("Error converting json to string " + e.getMessage(), e);
                }
                return "[Error converting json to string]";
        }
index 712b18a..4e715fa 100644 (file)
@@ -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.
index da35b0e..f3f252d 100644 (file)
@@ -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.
@@ -20,6 +21,8 @@
 
 package org.openecomp.mso.adapters.vnfrest;
 
+import org.openecomp.mso.logger.MsoLogger;
+
 
 import java.util.Map;
 
@@ -27,12 +30,13 @@ import javax.xml.bind.annotation.XmlRootElement;
 
 import org.codehaus.jackson.map.ObjectMapper;
 import org.jboss.resteasy.annotations.providers.NoJackson;
-
+import org.openecomp.mso.logger.MsoLogger;
 import org.openecomp.mso.openstack.beans.VnfStatus;
 
 @XmlRootElement(name = "queryVfModuleResponse")
 @NoJackson
 public class QueryVfModuleResponse {
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
        private String vnfId;
        private String vfModuleId;
        private String vfModuleStackId;
@@ -100,7 +104,9 @@ public class QueryVfModuleResponse {
                        ObjectMapper mapper = new ObjectMapper();
                        jsonString = mapper.writeValueAsString(this);
                }
-               catch (Exception e) {}
+               catch (Exception e) {
+                       LOGGER.debug("Exception :",e);
+               }
                return jsonString;
        }
 }
index 776bdf3..e70b9dd 100644 (file)
@@ -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.
@@ -29,11 +30,14 @@ import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.map.SerializationConfig;
 import org.jboss.resteasy.annotations.providers.NoJackson;
 
+import org.openecomp.mso.logger.MsoLogger;
+
 import org.openecomp.mso.openstack.beans.VnfStatus;
 
 @XmlRootElement(name = "queryVolumeGroupResponse")
 @NoJackson
 public class QueryVolumeGroupResponse {
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
        private String volumeGroupId;
        private String volumeGroupStackId;
        private VnfStatus volumeGroupStatus;
@@ -94,7 +98,9 @@ public class QueryVolumeGroupResponse {
                        mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
                        jsonString = mapper.writeValueAsString(this);
                }
-               catch (Exception e) {}
+               catch (Exception e) {
+                       LOGGER.debug("Exception :",e);
+               }
                return jsonString;
        }
 }
index 39201d5..4a902bd 100644 (file)
@@ -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.
@@ -26,6 +27,8 @@ import java.io.ByteArrayOutputStream;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 
+import org.openecomp.mso.logger.MsoLogger;
+
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.map.SerializationConfig;
 
@@ -34,6 +37,7 @@ import org.codehaus.jackson.map.SerializationConfig;
  * except for QueryVfModuleResponse and QueryVolumeGroupResponse.
  */
 public abstract class VfResponseCommon {
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
        private String messageId;
 
        public VfResponseCommon() {
@@ -60,8 +64,7 @@ public abstract class VfResponseCommon {
                        jsonString = mapper.writeValueAsString(this);
                        return jsonString;
                } catch (Exception e) {
-                       // Shouldn't happen...
-                       e.printStackTrace();
+                       LOGGER.debug("Exception :",e);
                        return "";
                }
        }
@@ -75,8 +78,7 @@ public abstract class VfResponseCommon {
                        marshaller.marshal(this, bs);
                        return bs.toString();
                } catch (Exception e) {
-                       // Shouldn't happen...
-                       e.printStackTrace();
+                       LOGGER.debug("Exception :",e);
                        return "";
                }
        }
index 88d5024..f7fc214 100644 (file)
@@ -5,12 +5,17 @@
                        <module name="org.apache.log4j" />\r
                        <module name="org.slf4j" />\r
                        <module name="org.slf4j.impl" />\r
+                       <module name="org.jboss.resteasy.resteasy-jackson-provider" />\r
+                       <module name="org.jboss.resteasy.resteasy-jettison-provider" />\r
                </exclusions>\r
                <dependencies>\r
                            <module name="org.jboss.jandex" slot="main" />\r
                 <module name="org.javassist" slot="main" />\r
                 <module name="org.antlr" slot="main" />\r
                 <module name="org.dom4j" slot="main" />\r
+                <module name="org.jboss.resteasy.resteasy-jackson2-provider" services="import" />\r
+                <!-- This module contain the ProviderBase class: -->\r
+                <module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" export="true" />\r
                </dependencies>\r
        </deployment>\r
 </jboss-deployment-structure>\r
index 1d07d7d..253523e 100644 (file)
@@ -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.
@@ -160,7 +161,7 @@ public class BPRestCallback {
                                try {
                                        EntityUtils.consume(httpResponse.getEntity());
                                } catch (Exception e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
 
@@ -168,7 +169,7 @@ public class BPRestCallback {
                                try {
                                        method.reset();
                                } catch (Exception e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
 
index 3b6c160..dc94a78 100644 (file)
@@ -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.
@@ -99,6 +100,7 @@ public class WMAdapterRest {
                                contentType = ContentType.parse(contentTypeHeader);
                        } catch (Exception e) {
                                // If we don't get a valid one, we handle it below.
+                               LOGGER.debug("Exception :",e);
                        }
                }
 
index 761263f..f152931 100644 (file)
@@ -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.
@@ -36,7 +37,7 @@ public final class WMAdapterUtils {
                try {
                        return UriUtils.encodePathSegment(pathSegment, "UTF-8");
                } catch (UnsupportedEncodingException e) {
-                       throw new RuntimeException("UTF-8 encoding is not supported");
+                       throw new RuntimeException("UTF-8 encoding is not supported",e);
                }
        }
 
index f722be7..3ca8527 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -397,7 +398,7 @@ public class ASDCController {
                outFile.write(payloadBytes, 0, payloadBytes.length);\r
                outFile.close();\r
                } catch (Exception e) { \r
-               e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                 LOGGER.error(MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL,\r
                                        artifact.getArtifactName (),\r
                                        artifact.getArtifactURL (),\r
index 176f655..70fa7c1 100644 (file)
@@ -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.
@@ -47,11 +48,14 @@ import org.openecomp.mso.db.catalog.beans.ServiceToAllottedResources;
 import org.openecomp.mso.db.catalog.beans.ServiceToNetworks;
 import org.openecomp.mso.db.catalog.beans.VnfResource;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * This structure exists to avoid having issues if the order of the vfResource/vfmodule artifact is not good (tree structure).
  *
  */
 public final class VfResourceStructure {
+       
+       protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC);
 
        private boolean isDeployedSuccessfully=false;
        /**
@@ -231,11 +235,11 @@ public final class VfResourceStructure {
                        return listVFModuleMetaData;
 
                } catch (JsonParseException e) {
-                       e.printStackTrace();
+                       LOGGER.debug("JsonParseException : ",e);
                } catch (JsonMappingException e) {
-                       e.printStackTrace();
+                       LOGGER.debug("JsonMappingException : ",e);
                } catch (IOException e) {
-                       e.printStackTrace();
+                       LOGGER.debug("IOException : ",e);
                }
                return null;
        }
index 3d3c87f..f9fd9c3 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -558,8 +559,7 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
                        vfResourceStructure.setSuccessfulDeployment();\r
                        \r
                }catch(Exception e){\r
-                       System.out.println("Exception" + e.getMessage());\r
-                       e.printStackTrace();\r
+                       logger.debug("Exception :",e);\r
                        \r
                        Throwable dbExceptionToCapture = e;\r
                        while (!(dbExceptionToCapture instanceof ConstraintViolationException || dbExceptionToCapture instanceof LockAcquisitionException)\r
index da356bd..9b38a50 100644 (file)
@@ -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.
@@ -33,6 +34,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.openecomp.mso.logger.MsoLogger;
 import org.openecomp.sdc.api.notification.INotificationData;
 
 
@@ -40,6 +42,8 @@ public class NotificationLogging implements InvocationHandler {
        
        private static Map<Object, List<Method>> objectMethodsToLog = new HashMap<>();
 
+       protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC);
+       
        private static InvocationHandler handler = new InvocationHandler() {
                @Override
                public Object invoke(Object arg0, Method arg1, Object[] arg2)
@@ -93,6 +97,7 @@ public class NotificationLogging implements InvocationHandler {
                                        buffer.append(testNull(m.invoke(iNotif, (Object[])null)));
                                } catch (IllegalAccessException | IllegalArgumentException
                                                | InvocationTargetException e) {
+                                       LOGGER.debug("Exception :"+e);
                                        buffer.append("UNREADABLE");
                                }
                                buffer.append(System.lineSeparator());
index 24c881d..89e5ce2 100644 (file)
                        <classifier>tests</classifier>\r
                        <scope>test</scope>\r
                </dependency>\r
+               <dependency>\r
+            <groupId>org.openecomp.so</groupId>\r
+            <artifactId>common</artifactId>\r
+            <version>${project.version}</version>\r
+        </dependency>\r
                <dependency>\r
                        <groupId>javax.ws.rs</groupId>\r
                        <artifactId>javax.ws.rs-api</artifactId>\r
index 5394ba9..e938a25 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
 package org.openecomp.mso.bpmn.common.util;\r
 \r
 import java.security.GeneralSecurityException;\r
+import org.openecomp.mso.logger.MsoLogger;\r
 \r
 public class CryptoHandler implements ICryptoHandler {\r
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
 \r
        private static String msoKey = "aa3871669d893c7fb8abbcda31b88b4f";\r
        //private static String msoAaiPwd = "mso0206";\r
@@ -32,6 +35,7 @@ public class CryptoHandler implements ICryptoHandler {
                try {\r
                        return CryptoUtils.decrypt(msoAaiEncryptedPwd, msoKey);\r
                } catch (GeneralSecurityException e) {\r
+                       LOGGER.debug("GeneralSecurityException :",e);\r
                        return null;\r
                }\r
        }\r
@@ -41,6 +45,7 @@ public class CryptoHandler implements ICryptoHandler {
                try {\r
                        return CryptoUtils.encrypt(plainMsoPwd, msoKey);\r
                } catch (GeneralSecurityException e) {\r
+                       LOGGER.debug("GeneralSecurityException :",e);\r
                        return null;\r
                }\r
        }\r
@@ -50,6 +55,7 @@ public class CryptoHandler implements ICryptoHandler {
                try {\r
                        return CryptoUtils.decrypt(encryptedPwd, msoKey);\r
                } catch (GeneralSecurityException e) {\r
+                       LOGGER.debug("GeneralSecurityException :",e);\r
                        return null;\r
                }\r
        }\r
index 49e42ac..a4a8859 100644 (file)
@@ -76,6 +76,7 @@ public abstract class AbstractCallbackService {
                        logCallbackSuccess(method, startTime);\r
                        return new CallbackSuccess();\r
                } catch (Exception e) {\r
+                       LOGGER.debug("Exception :",e);\r
                        String msg = "Caught " + e.getClass().getSimpleName()\r
                                + " processing " + messageEventName + " with " + correlationVariable\r
                                + " = '" + correlationValue + "'";\r
index 7db4e76..7a53721 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -183,8 +184,7 @@ public class WorkflowResource {
                        workflowResponse.setMessageCode(500);\r
                        return Response.status(500).entity(workflowResponse).build();\r
                } catch (Exception ex) {\r
-                       msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key");\r
-                       ex.printStackTrace();\r
+                       msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key",ex);\r
                        workflowResponse.setMessage("Fail" );\r
                        workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());\r
                        if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());\r
@@ -258,6 +258,7 @@ public class WorkflowResource {
                try {\r
                        return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;\r
                } catch (Exception e) {\r
+                       msoLogger.debug("Exception :",e);\r
                        return true;\r
                }        \r
        }\r
@@ -601,7 +602,7 @@ public class WorkflowResource {
                                        + processKey \r
                                        + " with response: " \r
                                        + response.getResponse());\r
-                       \r
+                       msoLogger.debug("Exception :",ex);\r
                }\r
                \r
                msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, \r
index aba43eb..74bb59c 100644 (file)
@@ -5,12 +5,14 @@ import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 
+import org.openecomp.mso.logger.MsoLogger;
+
 /**
  * Sets up the unit test (H2) database for Camunda.
  */
 public class CamundaDBSetup {
        private static boolean isDBConfigured = false;
-
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
        public static synchronized void configure() throws SQLException {
                if (isDBConfigured) {
                        return;
@@ -66,13 +68,13 @@ public class CamundaDBSetup {
                        isDBConfigured = true;
                } catch (SQLException e) {
                        System.out.println("CamundaDBSetup caught " + e.getClass().getSimpleName());
-                       e.printStackTrace();
+                       LOGGER.debug("SQLException :",e);
                } finally {
                        if (stmt != null) {
                                try {
                                        stmt.close();
                                } catch (Exception e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
 
@@ -80,7 +82,7 @@ public class CamundaDBSetup {
                                try {
                                        connection.close();
                                } catch (Exception e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
                }
index eb1cd51..55f6221 100644 (file)
@@ -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.
@@ -200,6 +201,7 @@ public class HealthCheckHandler  {
             UUID uuid = UUID.fromString(id);
             return uuid.toString().equalsIgnoreCase(id);
         } catch (IllegalArgumentException iae) {
+               msoLogger.debug("IllegalArgumentException :",iae);
             return false;
         }
     }
index 9d3af1c..70f67a5 100644 (file)
@@ -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.
@@ -167,7 +168,7 @@ public class PropertyConfiguration {
                                fileWatcherThread.join(waitInSeconds * 1000);
                        } catch (InterruptedException e) {
                                LOGGER.debug("FileWatcherThread " + System.identityHashCode(fileWatcherThread)
-                                       + " shutdown did not occur within " + waitInSeconds + " seconds");
+                                       + " shutdown did not occur within " + waitInSeconds + " seconds",e);
                        }
 
                        LOGGER.debug("Finished shutting down FileWatcherThread " + System.identityHashCode(fileWatcherThread));
@@ -257,7 +258,7 @@ public class PropertyConfiguration {
                                        reader.close();
                                        LOGGER.debug("Closed " + fileName);
                                } catch (Exception e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
                }
@@ -351,12 +352,14 @@ public class PropertyConfiguration {
                                                        }
                                                }
                                        } catch (InterruptedException e) {
+                                               LOGGER.debug("InterruptedException :",e);
                                                break;
                                        } catch (ClosedWatchServiceException e) {
                                                LOGGER.info(
                                                                MessageEnum.BPMN_GENERAL_INFO,
                                                                "BPMN",
                                                                "FileWatcherThread shut down because the watch service was closed");
+                                               LOGGER.debug("ClosedWatchServiceException :",e);
                                                break;
                                        } catch (Exception e) {
                                                LOGGER.error(
@@ -379,7 +382,7 @@ public class PropertyConfiguration {
                                        watchService.close();
                                } catch (IOException e) {
                                        LOGGER.debug("FileWatcherThread caught " + e.getClass().getSimpleName()
-                                               + " while closing the watch service");
+                                               + " while closing the watch service",e);
                                }
 
                                LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
index f58efe7..ce171b5 100644 (file)
@@ -1,3 +1,24 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
 package org.openecomp.mso.bpmn.core;
 
 import java.io.FileOutputStream;
@@ -11,6 +32,8 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
+import org.openecomp.mso.logger.MsoLogger;
+
 import org.openecomp.mso.bpmn.core.PropertyConfiguration;
 
 /**
@@ -22,6 +45,8 @@ public class PropertyConfigurationSetup {
        private static Path bpmnPropertiesPath = null;
        private static Path bpmnUrnPropertiesPath = null;
        private static boolean modifiedConfiguration = false;
+       
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
 
        /**
         * Ensures that the the PropertyConfiguration is initialized and that the
@@ -232,7 +257,7 @@ public class PropertyConfigurationSetup {
                                try {
                                        fileReader.close();
                                } catch (IOException e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
 
@@ -240,7 +265,7 @@ public class PropertyConfigurationSetup {
                                try {
                                        outputStream.close();
                                } catch (IOException e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
                }
@@ -279,7 +304,7 @@ public class PropertyConfigurationSetup {
                                try {
                                        fileReader.close();
                                } catch (IOException e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
 
@@ -287,7 +312,7 @@ public class PropertyConfigurationSetup {
                                try {
                                        outputStream.close();
                                } catch (IOException e) {
-                                       // Ignore
+                                       LOGGER.debug("Exception :",e);
                                }
                        }
                }
index 10e52d1..dc87304 100644 (file)
@@ -16,7 +16,7 @@ import com.fasterxml.jackson.databind.ObjectWriter;
 import com.fasterxml.jackson.databind.SerializationFeature;\r
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;\r
 \r
-\r
+import org.openecomp.mso.logger.MsoLogger;\r
 //import org.codehaus.jackson.map.SerializationConfig.Feature;\r
 \r
 \r
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 @JsonInclude(Include.NON_NULL)\r
 public abstract class JsonWrapper implements Serializable  {\r
        \r
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
        @JsonInclude(Include.NON_NULL)\r
        public String toJsonString(){\r
                \r
@@ -54,7 +55,7 @@ public abstract class JsonWrapper implements Serializable  {
 //             }\r
                } catch (Exception e){\r
 \r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return jsonString;\r
        }\r
@@ -72,17 +73,13 @@ public abstract class JsonWrapper implements Serializable  {
          try {\r
                        json = new JSONObject(mapper.writeValueAsString(this));\r
                } catch (JsonGenerationException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JSONException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
          return json; \r
        }\r
@@ -95,14 +92,11 @@ public abstract class JsonWrapper implements Serializable  {
                try {\r
                        jsonString = mapper.writeValueAsString(list);\r
                } catch (JsonGenerationException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return jsonString;\r
        }\r
@@ -120,7 +114,7 @@ public abstract class JsonWrapper implements Serializable  {
                        jsonString = ow.writeValueAsString(this);\r
                } catch (Exception e){\r
 \r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return jsonString;\r
        }\r
index 32c4776..738ec49 100644 (file)
@@ -14,8 +14,10 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonMappingException;\r
 import com.fasterxml.jackson.databind.ObjectMapper;\r
 \r
+import org.openecomp.mso.logger.MsoLogger;\r
+\r
 public class DecomposeJsonUtil implements Serializable {\r
-       \r
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
        /**\r
         * \r
         */\r
@@ -40,14 +42,11 @@ public class DecomposeJsonUtil implements Serializable {
                try {\r
                        serviceDecomposition = om.readValue(jsonString, ServiceDecomposition.class);\r
                } catch (JsonParseException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("JsonParseException :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("JsonMappingException :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("IOException :",e);\r
                }\r
                \r
                return serviceDecomposition;\r
@@ -72,14 +71,11 @@ public class DecomposeJsonUtil implements Serializable {
                try {\r
                        vnfResource = om.readValue(jsonString, VnfResource.class);\r
                } catch (JsonParseException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("JsonParseException :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("JsonMappingException :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("IOException :",e);\r
                }\r
                return vnfResource;\r
        }\r
@@ -103,14 +99,11 @@ public class DecomposeJsonUtil implements Serializable {
                try {\r
                        networkResource = om.readValue(jsonString, NetworkResource.class);\r
                } catch (JsonParseException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return networkResource;\r
        }\r
@@ -134,14 +127,11 @@ public class DecomposeJsonUtil implements Serializable {
                try {\r
                        allottedResource = om.readValue(jsonString, AllottedResource.class);\r
                } catch (JsonParseException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return allottedResource;\r
        }\r
index f7f6264..54a5732 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -67,7 +68,7 @@ public class JsonUtils {
                                return jsonObj.toString(MSOJsonIndentFactor);\r
                        }\r
                } catch (Exception e){\r
-                               msoLogger.debug("xml2json(): unable to parse xml and convert to json. Exception was: " + e.toString());\r
+                               msoLogger.debug("xml2json(): unable to parse xml and convert to json. Exception was: " + e.toString(), e);\r
                                return null;\r
                }\r
        }\r
@@ -106,7 +107,7 @@ public class JsonUtils {
                                return toXMLString(jsonObj, null);\r
                        }\r
                } catch (Exception e){\r
-                               msoLogger.debug("json2xml(): unable to parse json and convert to xml. Exception was: " + e.toString());\r
+                               msoLogger.debug("json2xml(): unable to parse json and convert to xml. Exception was: " + e.toString(), e);\r
                                return null;\r
                }\r
        }\r
@@ -264,7 +265,7 @@ public class JsonUtils {
                        JSONObject jsonObj = new JSONObject(jsonStr);\r
                        return jsonObj.toString(MSOJsonIndentFactor);\r
                } catch (Exception e){\r
-                       msoLogger.debug("prettyJson(): unable to parse/format json input. Exception was: " + e.toString());\r
+                       msoLogger.debug("prettyJson(): unable to parse/format json input. Exception was: " + e.toString(), e);\r
                        return null;\r
                }\r
        }\r
@@ -334,7 +335,7 @@ public class JsonUtils {
                                        }\r
                                }\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString(),e);\r
                }\r
                return null;\r
        }\r
@@ -363,7 +364,7 @@ public class JsonUtils {
                                        }\r
                                }\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonNodeValue(): unable to parse json to retrieve node for field=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonNodeValue(): unable to parse json to retrieve node for field=" + keys + ". Exception was: " + e.toString(), e);\r
                }\r
                return null;\r
        }\r
@@ -395,7 +396,7 @@ public class JsonUtils {
                                        }\r
                                }\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString(), e);\r
                }\r
                return 0;\r
        }\r
@@ -424,7 +425,7 @@ public class JsonUtils {
                                        }\r
                                }\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString(),e);\r
                }\r
                return false;\r
        }\r
@@ -500,9 +501,9 @@ public class JsonUtils {
                        }\r
                } catch (JSONException je) {\r
                                // JSONObject::get() throws this exception if one of the specified keys is not found\r
-                               msoLogger.debug("getJsonParamValue(): caught JSONException attempting to retrieve param value for keys:" + keys + ", name=" + name);\r
+                               msoLogger.debug("getJsonParamValue(): caught JSONException attempting to retrieve param value for keys:" + keys + ", name=" + name, je);\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonParamValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonParamValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString(), e);\r
                }\r
                return null;\r
        }\r
@@ -523,7 +524,7 @@ public class JsonUtils {
                                return getJsonValueForKey(jsonObj, key);\r
                        }\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString(), e);\r
                }\r
                return null;\r
        }\r
@@ -567,10 +568,10 @@ public class JsonUtils {
                        }\r
                } catch (JSONException je) {\r
                                // JSONObject::get() throws this exception if one of the specified keys is not found\r
-                               msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key);\r
+                               msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key, je);\r
                                keyValue = null;\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString(), e);\r
                }\r
                return keyValue;\r
        }\r
@@ -610,10 +611,10 @@ public class JsonUtils {
                        }\r
                } catch (JSONException je) {\r
                                // JSONObject::get() throws this exception if one of the specified keys is not found\r
-                               msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key);\r
+                               msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key, je);\r
                                keyValue = null;\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString(),e);\r
                }\r
                return keyValue;\r
        }\r
@@ -653,10 +654,10 @@ public class JsonUtils {
                        }\r
                } catch (JSONException je) {\r
                                // JSONObject::get() throws this exception if one of the specified keys is not found\r
-                               msoLogger.debug("getJsonBooleanValueForKey(): caught JSONException attempting to retrieve value for key=" + key);\r
+                               msoLogger.debug("getJsonBooleanValueForKey(): caught JSONException attempting to retrieve value for key=" + key,je);\r
                                keyValue = null;\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonBooleanValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonBooleanValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString(),e);\r
                }\r
                return keyValue;\r
        }\r
@@ -800,9 +801,9 @@ public class JsonUtils {
 \r
                } catch (JSONException je) {\r
                                // JSONObject::get() throws this exception if one of the specified keys is not found\r
-                               msoLogger.debug("getJsonRawValue(): caught JSONException attempting to retrieve raw value for key=" + keyStr);\r
+                               msoLogger.debug("getJsonRawValue(): caught JSONException attempting to retrieve raw value for key=" + keyStr,je);\r
                } catch (Exception e) {\r
-                               msoLogger.debug("getJsonRawValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("getJsonRawValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString(),e);\r
                }\r
                return null;\r
        }\r
@@ -842,10 +843,10 @@ public class JsonUtils {
 \r
                } catch (JSONException je) {\r
                                // JSONObject::get() throws this exception if one of the specified keys is not found\r
-                               msoLogger.debug("putJsonValue(): caught JSONException attempting to retrieve value for key=" + keyStr);\r
+                               msoLogger.debug("putJsonValue(): caught JSONException attempting to retrieve value for key=" + keyStr,je);\r
                                return null;\r
                } catch (Exception e) {\r
-                               msoLogger.debug("putJsonValue(): unable to parse json to put value for key=" + keys + ". Exception was: " + e.toString());\r
+                               msoLogger.debug("putJsonValue(): unable to parse json to put value for key=" + keys + ". Exception was: " + e.toString(),e);\r
                }\r
                return null;\r
        }\r
@@ -961,7 +962,7 @@ public class JsonUtils {
                                return true;\r
                        }\r
                } catch (Exception e) {\r
-                               msoLogger.debug("jsonElementExist(): unable to determine if json element exist. Exception is: " + e.toString());\r
+                               msoLogger.debug("jsonElementExist(): unable to determine if json element exist. Exception is: " + e.toString(),e);\r
                }\r
                return true;\r
        }\r
index 8898f27..ac514b9 100644 (file)
@@ -15,12 +15,15 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectWriter;\r
 import com.fasterxml.jackson.databind.SerializationFeature;\r
 \r
+import org.openecomp.mso.logger.MsoLogger;\r
+\r
 @JsonInclude(Include.NON_NULL)\r
 public abstract class JsonWrapper implements Serializable  {\r
        \r
 \r
        private static final long serialVersionUID = 8633550139273639875L;\r
 \r
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);\r
        @JsonInclude(Include.NON_NULL)\r
        public String toJsonString(){\r
                \r
@@ -45,7 +48,7 @@ public abstract class JsonWrapper implements Serializable  {
 //             }\r
                } catch (Exception e){\r
 \r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return jsonString;\r
        }\r
@@ -63,17 +66,13 @@ public abstract class JsonWrapper implements Serializable  {
          try {\r
                        json = new JSONObject(mapper.writeValueAsString(this));\r
                } catch (JsonGenerationException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JSONException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }               \r
          return json; \r
        }\r
@@ -86,14 +85,11 @@ public abstract class JsonWrapper implements Serializable  {
                try {\r
                        jsonString = mapper.writeValueAsString(list);\r
                } catch (JsonGenerationException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (JsonMappingException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
-                       // TODO Auto-generated catch block\r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return jsonString;\r
        }\r
@@ -111,7 +107,7 @@ public abstract class JsonWrapper implements Serializable  {
                        jsonString = ow.writeValueAsString(this);\r
                } catch (Exception e){\r
 \r
-                       e.printStackTrace();\r
+                       LOGGER.debug("Exception :",e);\r
                }\r
                return jsonString;\r
        }\r
index 54d30d6..0eb16a2 100644 (file)
@@ -248,13 +248,15 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
                        if (siParamsXml == null)
                                siParamsXml = ""
                        execution.setVariable("siParamsXml", siParamsXml)
-       
+
                        //AAI PUT
-                       String oStatus= "Active"
+                       String oStatus = execution.getVariable("initialStatus") ?: ""
                        if ("TRANSPORT".equalsIgnoreCase(serviceType))
                        {
                                oStatus = "Created"
                        }
+
+                       String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${oStatus}</orchestration-status>"
                                
                        AaiUtil aaiUriUtil = new AaiUtil(this)
                        String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -264,7 +266,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
                                        <service-instance-name>${serviceInstanceName}</service-instance-name>
                                        <service-type>${serviceType}</service-type>
                                        <service-role>${serviceRole}</service-role>
-                                       <orchestration-status>${oStatus}</orchestration-status>
+                                       ${statusLine}
                                    <model-invariant-id>${modelInvariantUuid}</model-invariant-id>
                                    <model-version-id>${modelUuid}</model-version-id>
                                        </service-instance>""".trim()
index dbd40c0..acf380f 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
       <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -39,6 +39,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
         <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
         <camunda:in sourceExpression="1610" target="sdncVersion" />
+        <camunda:in source="initialStatus" target="initialStatus" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
index 34f7a23..500535d 100644 (file)
                                </exclusion>
                        </exclusions>
                </dependency>
+               <dependency>
+            <groupId>org.openecomp.so</groupId>
+            <artifactId>common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
                <dependency>
                        <groupId>javax.ws.rs</groupId>
                        <artifactId>javax.ws.rs-api</artifactId>
index 33a65e6..1f17a8b 100644 (file)
@@ -2,7 +2,8 @@
  * ============LICENSE_START======================================================= 
  * ONAP - SO 
  * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
+ * 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. 
@@ -22,6 +23,7 @@ package org.openecomp.mso.bpmn.mock;
 
 import org.jboss.resteasy.client.ClientRequest;
 import org.jboss.resteasy.client.ClientResponse;
+import org.openecomp.mso.logger.MsoLogger;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
 import com.github.tomakehurst.wiremock.common.FileSource;
@@ -29,6 +31,7 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * 
  * Simulates SDNC Adapter Callback response
@@ -36,6 +39,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
  */
 public class SDNCAdapterMockTransformer extends ResponseTransformer {
 
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
        private String callbackResponse;
        private String requestId;
        
@@ -121,8 +125,7 @@ public class SDNCAdapterMockTransformer extends ResponseTransformer {
                                //Delay sending callback response
                                sleep(delay);
                        } catch (InterruptedException e1) {
-                               // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :",e1);
                        }
                        System.out.println("Sending callback response:" + callbackUrl);
                        ClientRequest request = new ClientRequest(callbackUrl);
@@ -132,8 +135,7 @@ public class SDNCAdapterMockTransformer extends ResponseTransformer {
                                ClientResponse result = request.post();
                                //System.err.println("Successfully posted callback:" + result.getStatus());
                        } catch (Exception e) {
-                               // TODO Auto-generated catch block
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
                
index 673ac00..b782c05 100644 (file)
@@ -2,7 +2,8 @@
  * ============LICENSE_START======================================================= 
  * ONAP - SO 
  * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
+ * 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. 
@@ -29,8 +30,12 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
+import org.openecomp.mso.logger.MsoLogger;
+
 public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseTransformer {
 
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       
        private String callbackResponse;
        private String requestId;
        
@@ -110,7 +115,7 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseTransform
                                sleep(delay);
                        } catch (InterruptedException e1) {
                                // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :",e1);
                        }
                        System.out.println("Sending callback response to url: " + callbackUrl);
                        ClientRequest request = new ClientRequest(callbackUrl);
@@ -122,7 +127,7 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseTransform
                        } catch (Exception e) {
                                // TODO Auto-generated catch block
                                System.out.println("catch error in - request.post() ");
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
                
index 1e32077..ebedca8 100644 (file)
@@ -6,6 +6,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. 
@@ -27,6 +28,7 @@ import javax.xml.ws.Endpoint;
 
 import org.jboss.resteasy.client.ClientRequest;
 import org.jboss.resteasy.client.ClientResponse;
+import org.openecomp.mso.logger.MsoLogger;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
 import com.github.tomakehurst.wiremock.common.FileSource;
@@ -34,12 +36,15 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * Please describe the VnfAdapterCreateMockTransformer.java class
  *
  */
 public class VnfAdapterCreateMockTransformer extends ResponseTransformer {
 
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       
        private String notifyCallbackResponse;
        private String ackResponse;
 
@@ -71,6 +76,7 @@ public class VnfAdapterCreateMockTransformer extends ResponseTransformer {
                        responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
                    updatedResponse = ackResponse.replace(responseMessageId, messageId);
                } catch (Exception ex) {
+                       LOGGER.debug("Exception :",ex);
                        System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfCreateSimResponse.xml'");
                    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
                        updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
@@ -124,7 +130,7 @@ public class VnfAdapterCreateMockTransformer extends ResponseTransformer {
                                sleep(delay);
                        } catch (InterruptedException e1) {
                                // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :",e1);
                        }
                        System.out.println("Sending callback response to url: " + callbackUrl);
                        ClientRequest request = new ClientRequest(callbackUrl);
@@ -138,7 +144,7 @@ public class VnfAdapterCreateMockTransformer extends ResponseTransformer {
                        } catch (Exception e) {
                                // TODO Auto-generated catch block
                                System.out.println("catch error in - request.post() ");
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
 
index 553aed6..b2c25fc 100644 (file)
@@ -6,6 +6,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,19 +26,20 @@ package org.openecomp.mso.bpmn.mock;
 
 import org.jboss.resteasy.client.ClientRequest;
 import org.jboss.resteasy.client.ClientResponse;
+import org.openecomp.mso.logger.MsoLogger;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
 import com.github.tomakehurst.wiremock.common.FileSource;
 import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
-
 /**
  * Please describe the VnfAdapterCreateMockTransformer.java class
  *
  */
 public class VnfAdapterDeleteMockTransformer extends ResponseTransformer {
 
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
 
        private String notifyCallbackResponse;
        private String ackResponse;
@@ -72,6 +74,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseTransformer {
                        responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
                    updatedResponse = ackResponse.replace(responseMessageId, messageId);
                } catch (Exception ex) {
+                       LOGGER.debug("Exception :",ex);
                        System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'");
                    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
                        updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
@@ -125,7 +128,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseTransformer {
                                sleep(delay);
                        } catch (InterruptedException e1) {
                                // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :",e1);
                        }
                        System.out.println("Sending callback response to url: " + callbackUrl);
                        ClientRequest request = new ClientRequest(callbackUrl);
@@ -138,7 +141,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseTransformer {
                        } catch (Exception e) {
                                // TODO Auto-generated catch block
                                System.out.println("catch error in - request.post() ");
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
 
index c1d27d5..5aae339 100644 (file)
@@ -2,7 +2,8 @@
  * ============LICENSE_START======================================================= 
  * ONAP - SO 
  * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
+ * 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,6 +26,7 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 
 import org.jboss.resteasy.client.ClientRequest;
 import org.jboss.resteasy.client.ClientResponse;
+import org.openecomp.mso.logger.MsoLogger;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
 import com.github.tomakehurst.wiremock.common.FileSource;
@@ -32,6 +34,7 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * Please describe the VnfAdapterQueryMockTransformer.java class
  *
@@ -40,6 +43,8 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
 public class VnfAdapterQueryMockTransformer extends ResponseTransformer{
        
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       
        private String notifyCallbackResponse;
        private String ackResponse;
        private String messageId;
@@ -84,6 +89,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseTransformer{
                        responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
                    updatedResponse = ackResponse.replace(responseMessageId, messageId); 
                } catch (Exception ex) {
+                       LOGGER.debug("Exception :",ex);
                        System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'");
                    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
                        updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
@@ -139,8 +145,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseTransformer{
                                //Delay sending callback response
                                sleep(delay);
                        } catch (InterruptedException e1) {
-                               // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :",e1);
                        }
                        ClientRequest request = new ClientRequest(callbackUrl);
                        request.body("text/xml", payLoad);
@@ -149,8 +154,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseTransformer{
                                ClientResponse result = request.post();
                                //System.err.println("Successfully posted callback:" + result.getStatus());
                        } catch (Exception e) {
-                               // TODO Auto-generated catch block
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
 
index 5207fa0..45a67de 100644 (file)
@@ -5,7 +5,8 @@
  * ============LICENSE_START======================================================= 
  * ONAP - SO 
  * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
+ * 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. 
@@ -32,12 +33,15 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * Please describe the VnfAdapterCreateMockTransformer.java class
  *
  */
 public class VnfAdapterRollbackMockTransformer extends ResponseTransformer {
 
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
        private String notifyCallbackResponse;
        private String ackResponse;
        private String messageId;
@@ -74,6 +78,7 @@ public class VnfAdapterRollbackMockTransformer extends ResponseTransformer {
                        responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
                    updatedResponse = ackResponse.replace(responseMessageId, messageId); 
                } catch (Exception ex) {
+                       LOGGER.debug("Exception :",ex);
                        System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'");
                    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
                        updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
@@ -125,8 +130,7 @@ public class VnfAdapterRollbackMockTransformer extends ResponseTransformer {
                                //Delay sending callback response
                                sleep(delay);
                        } catch (InterruptedException e1) {
-                               // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :",e1);
                        }
                        System.out.println("Sending callback response to url: " + callbackUrl);
                        ClientRequest request = new ClientRequest(callbackUrl);
@@ -137,9 +141,8 @@ public class VnfAdapterRollbackMockTransformer extends ResponseTransformer {
                                System.out.println("Successfully posted callback? Status: " + result.getStatus());
                                //System.err.println("Successfully posted callback:" + result.getStatus());
                        } catch (Exception e) {
-                               // TODO Auto-generated catch block
                                System.out.println("catch error in - request.post() ");                         
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
 
index e84e57c..d67ffcd 100644 (file)
@@ -5,7 +5,8 @@
  * ============LICENSE_START======================================================= 
  * ONAP - SO 
  * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
+ * 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,6 +26,7 @@ package org.openecomp.mso.bpmn.mock;
 
 import org.jboss.resteasy.client.ClientRequest;
 import org.jboss.resteasy.client.ClientResponse;
+import org.openecomp.mso.logger.MsoLogger;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
 import com.github.tomakehurst.wiremock.common.FileSource;
@@ -32,12 +34,15 @@ import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * Please describe the VnfAdapterUpdateMockTransformer.java class
  *
  */
 public class VnfAdapterUpdateMockTransformer extends ResponseTransformer {
 
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       
        private String notifyCallbackResponse;
        private String requestId;
        private String ackResponse;
@@ -74,6 +79,7 @@ public class VnfAdapterUpdateMockTransformer extends ResponseTransformer {
                        responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
                    updatedResponse = ackResponse.replace(responseMessageId, messageId); 
                } catch (Exception ex) {
+                       LOGGER.debug("Exception :",ex);
                        System.out.println(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'");
                    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
                        updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
@@ -125,8 +131,7 @@ public class VnfAdapterUpdateMockTransformer extends ResponseTransformer {
                                //Delay sending callback response
                                sleep(delay);
                        } catch (InterruptedException e1) {
-                               // TODO Auto-generated catch block
-                               e1.printStackTrace();
+                               LOGGER.debug("Exception :", e1);
                        }
                        System.out.println("Sending callback response to url: " + callbackUrl);                 
                        ClientRequest request = new ClientRequest(callbackUrl);
@@ -137,9 +142,8 @@ public class VnfAdapterUpdateMockTransformer extends ResponseTransformer {
                                System.out.println("Successfully posted callback? Status: " + result.getStatus());                              
                                //System.err.println("Successfully posted callback:" + result.getStatus());
                        } catch (Exception e) {
-                               // TODO Auto-generated catch block
                                System.out.println("catch error in - request.post() ");
-                               e.printStackTrace();
+                               LOGGER.debug("Exception :",e);
                        }
                }
 
index b042a9e..1bcb3b7 100644 (file)
                        <scope>test</scope>\r
                </dependency>\r
 \r
+               <dependency>\r
+            <groupId>org.openecomp.so</groupId>\r
+            <artifactId>common</artifactId>\r
+            <version>${project.version}</version>\r
+        </dependency>\r
                </dependencies>\r
                <build>\r
                <finalName>MSORESTClient</finalName>\r
index 259f3d4..6504615 100644 (file)
@@ -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.
@@ -54,6 +55,7 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.http.message.AbstractHttpMessage;
 import org.apache.http.util.EntityUtils;
 
+import org.openecomp.mso.logger.MsoLogger;
 /**
  * Client used to send RESTFul requests.
  * <p>
@@ -82,6 +84,8 @@ import org.apache.http.util.EntityUtils;
  * @since 1.0
  */
 public class RESTClient {
+       
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
     private final String proxyHost;
     private final int proxyPort;
 
@@ -166,8 +170,7 @@ public class RESTClient {
                 }
             }
         } catch (UnsupportedEncodingException e) {
-            // should not occur
-            e.printStackTrace();
+            LOGGER.debug("Exception :", e);
         }
         return sb.toString();
     }
@@ -197,6 +200,7 @@ public class RESTClient {
                        clientBuilder = HttpClientBuilder.create().setConnectionManager(
                                        manager);
                } catch (Exception ex) {
+                       LOGGER.debug("Exception :", ex);
                        throw new RESTException(ex.getMessage());
                }
                clientBuilder.disableRedirectHandling();
index d41f241..19115ce 100644 (file)
@@ -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.
index 1252333..b715717 100644 (file)
@@ -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.
@@ -28,6 +29,8 @@ import java.util.UUID;
 /**
  */
 public class UUIDChecker {
+       
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
 
     private UUIDChecker() {
 
@@ -41,6 +44,7 @@ public class UUIDChecker {
             UUID uuid = UUID.fromString(id);
             return uuid.toString().equalsIgnoreCase(id);
         } catch (IllegalArgumentException iae) {
+               LOGGER.debug("IllegalArgumentException", iae);
             return false;
         }
     }
index acdae29..f3273cf 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO\r
  * ================================================================================\r
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.\r
  * ================================================================================\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -190,7 +191,7 @@ public class ManualTasks {
                                completeResp = mapper.writeValueAsString(trr);\r
                        }\r
                        catch (Exception e) {\r
-                               msoLogger.debug("Unable to format response");\r
+                               msoLogger.debug("Unable to format response",e);\r
                                Response resp = msoRequest.buildServiceErrorResponse(bpelStatus,\r
                                                MsoException.ServiceException,\r
                                                "Request Failed due to bad response format" ,\r
index e7a2334..eab232d 100644 (file)
@@ -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.
@@ -215,7 +216,7 @@ public class MsoRequest {
                requestJSON = mapper.writeValueAsString(sir.getRequestDetails());
 
         } catch(Exception e){
-               throw new ValidationException ("Parse ServiceInstanceRequest to JSON string");
+               throw new ValidationException ("Parse ServiceInstanceRequest to JSON string",e);
         }
 
         if(instanceIdMap != null){
index a176f69..26fdba4 100644 (file)
@@ -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.
@@ -343,7 +344,7 @@ public class OrchestrationRequests {
                requestDetails = mapper.readValue(requestBody, RequestDetails.class);
 
        }catch(Exception e){
-               msoLogger.debug("Exception caught mapping requestBody to RequestDetails");
+               msoLogger.debug("Exception caught mapping requestBody to RequestDetails",e);
        }
 
        request.setRequestDetails(requestDetails);
index a196cc0..e32f153 100644 (file)
@@ -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.
@@ -649,7 +650,7 @@ public class ServiceInstances {
                        msoRequest.updateFinalStatus (Status.FAILED);
                        msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
                        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
-                       msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                       msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e);
                        return resp;
                }
 
index b191a3d..1e8bea0 100644 (file)
@@ -164,7 +164,7 @@ public class TasksHandler {
                        msoRequest.updateFinalStatus (Status.FAILED);
                        msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
                        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
-                       msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                       msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e);
                        return resp;
                }
                TasksGetResponse trr = new TasksGetResponse();
@@ -206,7 +206,7 @@ public class TasksHandler {
                                                
                                                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
                                                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
-                                               msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                                               msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e);
                                                return resp;
                                        }
                                        taskList.add(taskListEntry);                            
@@ -235,7 +235,7 @@ public class TasksHandler {
                        jsonResponse = mapper.writeValueAsString(trr);
                }
                catch (Exception e) {
-                       msoLogger.debug("Unable to format response");
+                       msoLogger.debug("Unable to format response",e);
                        Response resp = msoRequest.buildServiceErrorResponse(500,
                                        MsoException.ServiceException,
                                        "Request Failed due to bad response format" ,
index de46fd9..20450ca 100644 (file)
@@ -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.
@@ -329,7 +330,7 @@ public class CatalogDatabase implements Closeable {
         try {
                environment = (HeatEnvironment) query.uniqueResult ();
         } catch (org.hibernate.NonUniqueResultException nure) {
-               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row for Envt - data integrity error: artifactUuid='" + artifactUuid +"'");
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row for Envt - data integrity error: artifactUuid='" + artifactUuid +"'", nure);
                LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for heatEnvironment artifactUuid=" + artifactUuid, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for artifactUuid==" + artifactUuid);
                environment = null;
         } catch (org.hibernate.HibernateException he) {
@@ -554,7 +555,7 @@ public class CatalogDatabase implements Closeable {
         try {
             result = (Service) query.uniqueResult();
         } catch (org.hibernate.NonUniqueResultException nure) {
-            LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelInvariantId='" + modelInvariantId + "', modelVersion='" + modelVersion + "'");
+            LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelInvariantId='" + modelInvariantId + "', modelVersion='" + modelVersion + "'", nure);
             LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for modelInvariantId=" + modelInvariantId + " and modelVersion=" + modelVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for modelInvariantId=" + modelInvariantId);
             throw new Exception("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: modelInvariantId='" + modelInvariantId + "', modelVersion='" + modelVersion + "'");
         }
@@ -3537,8 +3538,7 @@ public class CatalogDatabase implements Closeable {
                        //session.merge(heat);
                        session.save(heat);
                     } catch (HibernateException he1) {
-                       LOGGER.debug("Hibernate Exception encountered on first attempt at save(heat) - try again..." + he1.getMessage());
-                       LOGGER.debug(he1.getStackTrace().toString());
+                       LOGGER.debug("Hibernate Exception encountered on first attempt at save(heat) - try again..." + he1.getMessage(), he1);
                        try {
                                Session session = this.getSession();
                                //session.merge(heat);
@@ -3548,24 +3548,24 @@ public class CatalogDatabase implements Closeable {
                                LOGGER.debug(he2.getStackTrace().toString());
                                throw he2;
                        } catch (Exception e2) {
-                               LOGGER.debug("General Exception encountered on second attempt at save(heat)..." + e2.getMessage());
+                               LOGGER.debug("General Exception encountered on second attempt at save(heat)..." + e2.getMessage(),e2);
                                LOGGER.debug(e2.getStackTrace().toString());
                                throw e2;
                        }
                        
                     } catch (Exception e1) {
-                       LOGGER.debug("General Exception encountered on first attempt at save(heat) - try again..." + e1.getMessage());
+                       LOGGER.debug("General Exception encountered on first attempt at save(heat) - try again..." + e1.getMessage(), e1);
                        LOGGER.debug(e1.getStackTrace().toString());
                        try {
                                Session session = this.getSession();
                                //session.merge(heat);
                                session.save(heat);
                        } catch (HibernateException he2) {
-                               LOGGER.debug("General Exception encountered on second attempt at save(heat)" + he2.getMessage());
+                               LOGGER.debug("General Exception encountered on second attempt at save(heat)" + he2.getMessage(), he2);
                                LOGGER.debug(he2.getStackTrace().toString());
                                throw he2;
                        } catch (Exception e2) {
-                               LOGGER.debug("General Exception encountered on second attempt at save(heat)..." + e2.getMessage());
+                               LOGGER.debug("General Exception encountered on second attempt at save(heat)..." + e2.getMessage(), e2);
                                LOGGER.debug(e2.getStackTrace().toString());
                                throw e2;
                        }
@@ -3607,15 +3607,15 @@ public class CatalogDatabase implements Closeable {
         try {
                env = (HeatEnvironment) query.uniqueResult ();
         } catch (org.hibernate.NonUniqueResultException nure) {
-               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: envName='" + name + "', version='" + version + "' and asdcResourceName=" + asdcResourceName);
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: envName='" + name + "', version='" + version + "' and asdcResourceName=" + asdcResourceName, nure);
                LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for envName=" + name + " and version=" + version + " and asdcResourceName=" + asdcResourceName, "", "", MsoLogger.ErrorCode.DataError, "non unique result for envName=" + name);
                env = null;
         } catch (org.hibernate.HibernateException he) {
-               LOGGER.debug("Hibernate Exception - while searching for: envName='" + name + "', asdc_service_model_version='" + version + "' and asdcResourceName=" + asdcResourceName);
+               LOGGER.debug("Hibernate Exception - while searching for: envName='" + name + "', asdc_service_model_version='" + version + "' and asdcResourceName=" + asdcResourceName, he);
                LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for envName=" + name + " and version=" + version + " and asdcResourceName=" + asdcResourceName, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for envName=" + name);
                env = null;
         } catch (Exception e) {
-               LOGGER.debug("Generic Exception - while searching for: envName='" + name + "', asdc_service_model_version='" + version + "' and asdcResourceName=" + asdcResourceName);
+               LOGGER.debug("Generic Exception - while searching for: envName='" + name + "', asdc_service_model_version='" + version + "' and asdcResourceName=" + asdcResourceName, e);
                LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for envName=" + name + " and version=" + version + " and asdcResourceName=" + asdcResourceName, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for envName=" + name);
                env = null;
         }
@@ -3767,7 +3767,7 @@ public class CatalogDatabase implements Closeable {
         try {
                LOGGER.debug(vnfResourceCustomization.toString());
         } catch (Exception e) {
-               LOGGER.debug("Unable to print VRC " + e.getMessage());
+               LOGGER.debug("Unable to print VRC " + e.getMessage(), e);
         }
         try {
                         // Check if NetworkResourceCustomzation record already exists.  If so, skip saving it.
@@ -3789,7 +3789,7 @@ public class CatalogDatabase implements Closeable {
                        try {
                                LOGGER.debug("Existing VRC entry found\n" + existing.toString());
                        } catch (Exception e) {
-                               LOGGER.debug("Unable to print VRC2 " + e.getMessage());
+                               LOGGER.debug("Unable to print VRC2 " + e.getMessage(), e);
                        }
                        return false;
                }
@@ -4074,7 +4074,7 @@ public class CatalogDatabase implements Closeable {
                LOGGER.debug("heat template id = " + vfModule.getHeatTemplateArtifactUUId() + ", vol template id = "+ vfModule.getVolHeatTemplateArtifactUUId());
                LOGGER.debug(vfModule.toString());
         } catch (Exception e) {
-               LOGGER.debug("unable to print vfmodule " + e.getMessage());
+               LOGGER.debug("unable to print vfmodule " + e.getMessage(), e);
         }
         try {
                VfModule existing = this.getVfModuleByModelUUID(vfModule.getModelUUID());
@@ -4087,7 +4087,7 @@ public class CatalogDatabase implements Closeable {
                        try {
                                LOGGER.debug("Found an existing vf module!\n" + existing.toString());
                        } catch (Exception e) {
-                               LOGGER.debug("unable to print vfmodule2 " + e.getMessage());
+                               LOGGER.debug("unable to print vfmodule2 " + e.getMessage(), e);
             }
                }
                
@@ -4137,7 +4137,7 @@ public class CatalogDatabase implements Closeable {
                LOGGER.debug("env id = " + vfModuleCustomization.getHeatEnvironmentArtifactUuid() + ", vol Env=" + vfModuleCustomization.getVolEnvironmentArtifactUuid());
                LOGGER.debug(vfModuleCustomization.toString());
         } catch (Exception e) {
-               LOGGER.debug("unable to print vfmodulecust " + e.getMessage());
+               LOGGER.debug("unable to print vfmodulecust " + e.getMessage(), e);
         }
         try {
                VfModuleCustomization existing = this.getVfModuleCustomizationByModelCustomizationId(vfModuleCustomization.getModelCustomizationUuid());
@@ -4148,7 +4148,7 @@ public class CatalogDatabase implements Closeable {
                        try {
                                LOGGER.debug("Found an existing vf module customization entry\n" + existing.toString());
                        } catch (Exception e) {
-                               LOGGER.debug("unable to print vfmodulecust2 " + e.getMessage());
+                               LOGGER.debug("unable to print vfmodulecust2 " + e.getMessage(), e);
                }
                }
       
@@ -4420,7 +4420,7 @@ public class CatalogDatabase implements Closeable {
             
             return resultList.get (0);
         } catch (Exception e) {
-               LOGGER.debug("Error trying to find Network Resource with " + modelUUID +", " + e.getMessage());
+               LOGGER.debug("Error trying to find Network Resource with " + modelUUID +", " + e.getMessage(),e);
         } finally {
             LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceByModelUuid", null);
         }
@@ -4544,7 +4544,7 @@ public class CatalogDatabase implements Closeable {
 
             return resultList.get (0);
         } catch (Exception e) {
-               LOGGER.debug("Error trying to find Network Resource with " + modelCustomizationUuid +", " + e.getMessage());
+               LOGGER.debug("Error trying to find Network Resource with " + modelCustomizationUuid +", " + e.getMessage(),e);
         } finally {
             LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResourceByModelCustUuid", null);
         }
@@ -5062,7 +5062,7 @@ public class CatalogDatabase implements Closeable {
                try {
                        LOGGER.debug("Returning theObjects:" + theObjects.size());
                } catch (Exception e) {
-                       LOGGER.debug("Returning theObjects");
+                       LOGGER.debug("Returning theObjects",e);
                }
                LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "executeQuerySingleRow", null);
         }
diff --git a/pom.xml b/pom.xml
index 9601fe8..6e372fa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                        <source>1.8</source>
                                </configuration>
                        </plugin>
-                       <!-- license plugin -->
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>license-maven-plugin</artifactId>
-                               <version>1.10</version>
-                               <configuration>
-                                       <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
-                                       <processStartTag>============LICENSE_START=======================================================</processStartTag>
-                                       <processEndTag>============LICENSE_END=========================================================</processEndTag>
-                                       <sectionDelimiter>================================================================================</sectionDelimiter>
-                                       <licenseName>apache_v2</licenseName>
-                                       <inceptionYear>2017</inceptionYear>
-                                       <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
-                                       <projectName>ECOMP MSO</projectName>
-                                       <canUpdateCopyright>true</canUpdateCopyright>
-                                       <canUpdateDescription>true</canUpdateDescription>
-                                       <canUpdateLicense>true</canUpdateLicense>
-                                       <emptyLineAfterHeader>true</emptyLineAfterHeader>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>first</id>
-                                               <goals>
-                                                       <goal>update-file-header</goal>
-                                               </goals>
-                                               <phase>process-sources</phase>
-                                               <configuration>
-                                                       <licenseName>apache_v2</licenseName>
-                                                       <includes>
-                                                               <include>*.java</include>
-                                                               <include>*.groovy</include>
-                                                       </includes>
-                                                       <excludes>
-                                                               <exclude>*.json</exclude>
-                                                       </excludes>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
                </plugins>
        </build>
        <!-- *********************************************************************************************************** -->