diff --git a/asdctool/pom.xml b/asdctool/pom.xml
index d7ac069..9f9dc56 100644
--- a/asdctool/pom.xml
+++ b/asdctool/pom.xml
@@ -210,16 +210,9 @@
 		</dependency>
 
 		<dependency>
-			<groupId>commons-configuration</groupId>
-			<artifactId>commons-configuration</artifactId>
-			<version>1.6</version>
-			<scope>compile</scope>
-			<exclusions>
-				<exclusion>
-					<artifactId>commons-collections</artifactId>
-					<groupId>commons-collections</groupId>
-				</exclusion>
-			</exclusions>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-configuration2</artifactId>
+			<version>${commons-configuration}</version>
 		</dependency>
 
 		<dependency>
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/externalupload/utils/ServiceUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/externalupload/utils/ServiceUtils.java
index 20501ef..47e676d 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/externalupload/utils/ServiceUtils.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/externalupload/utils/ServiceUtils.java
@@ -12,16 +12,19 @@
  * 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdc.externalupload.utils;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableSet;
-import org.apache.commons.beanutils.BeanUtils;
 
 import java.lang.reflect.Field;
 import java.util.*;
+import org.onap.sdc.tosca.services.CommonUtil;
 
 public class ServiceUtils {
 
@@ -38,20 +41,11 @@
     }
 
     Map<String, Object> objectAsMap = getObjectAsMap(objectCandidate);
-    T result = classToCreate.newInstance();
 
     List<Field> declaredFields = getAllFields(classToCreate);
-    for( Field field : declaredFields){
-      if(isComplexClass(field)){
-        Optional<?> objectUsingSetters =
-            createObjectUsingSetters(objectAsMap.get(field.getName()), field.getType());
-        if( objectUsingSetters.isPresent()){
-          objectAsMap.remove(field.getName());
-          objectAsMap.put(field.getName(), objectUsingSetters.get());
-        }
-      }
-    }
-    BeanUtils.populate(result, objectAsMap);
+
+    CommonUtil.createSubObjectsUsingSetters(objectAsMap, declaredFields.toArray(new Field[0]));
+    T result = CommonUtil.populateBean(objectAsMap, classToCreate);
 
     return Optional.of(result);
   }
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml b/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
index 2aa4226..7f978bf 100755
--- a/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
@@ -41,7 +41,12 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-configuration2</artifactId>
-            <version>2.3</version>
+            <version>${commons-configuration}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>${commons-beanutils}</version>
         </dependency>
         <dependency>
             <groupId>commons-logging</groupId>
@@ -49,10 +54,6 @@
             <version>${commons-logging}</version>
         </dependency>
         <dependency>
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
diff --git a/common/onap-tosca-datatype/pom.xml b/common/onap-tosca-datatype/pom.xml
index 51c557f..eb0a31c 100644
--- a/common/onap-tosca-datatype/pom.xml
+++ b/common/onap-tosca-datatype/pom.xml
@@ -42,7 +42,7 @@
 		<dependency>
 			<groupId>commons-beanutils</groupId>
 			<artifactId>commons-beanutils</artifactId>
-			<version>${commons.beanutils.version}</version>
+			<version>${commons-beanutils}</version>
 		</dependency>
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/services/CommonUtil.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/services/CommonUtil.java
index 4ecf869..fdbcb25 100644
--- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/services/CommonUtil.java
+++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/services/CommonUtil.java
@@ -12,12 +12,14 @@
  * 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
-
 package org.onap.sdc.tosca.services;
 
-
 import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
@@ -25,10 +27,10 @@
 import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
-import org.apache.commons.beanutils.BeanUtils;
 import com.google.common.collect.ImmutableSet;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.beanutils.BeanUtils;
 
 public class CommonUtil {
 
@@ -47,9 +49,16 @@
             return Optional.empty();
         }
         Map<String, Object> objectAsMap = getObjectAsMap(objectCandidate);
-        T result = classToCreate.newInstance();
 
         Field[] declaredFields = classToCreate.getDeclaredFields();
+        createSubObjectsUsingSetters(objectAsMap, declaredFields);
+        T result = populateBean(objectAsMap, classToCreate);
+
+        return Optional.of(result);
+    }
+
+    public static void createSubObjectsUsingSetters(Map<String, Object> objectAsMap, Field[] declaredFields)
+        throws Exception {
         for (Field field : declaredFields) {
             if (isComplexClass(field)) {
                 Optional<?> objectUsingSetters =
@@ -60,9 +69,13 @@
                 }
             }
         }
-        BeanUtils.populate(result, objectAsMap);
+    }
 
-        return Optional.of(result);
+    public static <T> T populateBean(Map<String, Object> propertiesMap, Class<T> classToCreate)
+        throws IllegalAccessException, InstantiationException, InvocationTargetException {
+        T result = classToCreate.newInstance();
+        BeanUtils.populate(result, propertiesMap);
+        return result;
     }
 
     public static Map<String, Object> getObjectAsMap(Object obj) {
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java
new file mode 100644
index 0000000..d9d7f69
--- /dev/null
+++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia Intellectual Property. 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.onap.sdc.tosca.services;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Map;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CommonUtilTest {
+
+    private static final String INT_FIELD_KEY = "field1";
+    private static final Integer INT_FIELD_VALUE = 1;
+    private static final String STRING_FIELD_KEY = "field2";
+    private static final String STRING_FIELD_VALUE = "abc";
+
+    @Test
+    public void testPopulateBeanMethod()
+        throws InstantiationException, IllegalAccessException, InvocationTargetException {
+        Map<String, Object> props = new HashMap<>();
+        props.put(INT_FIELD_KEY, INT_FIELD_VALUE);
+        props.put(STRING_FIELD_KEY, STRING_FIELD_VALUE);
+        TestModel testModel = CommonUtil.populateBean(props, TestModel.class);
+        Assert.assertEquals(testModel.getField1(), INT_FIELD_VALUE);
+        Assert.assertEquals(testModel.getField2(), STRING_FIELD_VALUE);
+    }
+}
\ No newline at end of file
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java
new file mode 100644
index 0000000..e8fc346
--- /dev/null
+++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/TestModel.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2019 Nokia Intellectual Property. 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.onap.sdc.tosca.services;
+
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Setter
+@Getter
+@NoArgsConstructor
+public class TestModel {
+    private Integer field1;
+    private String field2;
+}
diff --git a/onboarding/pom.xml b/onboarding/pom.xml
index dcd952c..e518b73 100644
--- a/onboarding/pom.xml
+++ b/onboarding/pom.xml
@@ -70,7 +70,6 @@
         <bsh.version>2.0b5</bsh.version>
         <cglib.nodep.version>3.2.4</cglib.nodep.version>
         <classmate.version>1.3.3</classmate.version>
-        <commons.beanutils.version>1.9.3</commons.beanutils.version>
         <commons.codec.version>1.10</commons.codec.version>
         <commons.collections.version>4.1</commons.collections.version>
         <commons.digester.version>2.1</commons.digester.version>
@@ -221,7 +220,7 @@
             <dependency>
                 <groupId>commons-beanutils</groupId>
                 <artifactId>commons-beanutils</artifactId>
-                <version>${commons.beanutils.version}</version>
+                <version>${commons-beanutils}</version>
             </dependency>
             <dependency>
                 <groupId>com.google.code.findbugs</groupId>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index 4978b3f..5cf6f40 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -12,14 +12,15 @@
  * 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdcrests.vsp.rest.services;
 
-import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
 import org.openecomp.sdc.activitylog.ActivityLogManager;
 import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
 import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
@@ -56,7 +57,6 @@
 import javax.ws.rs.core.Response;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -125,7 +125,7 @@
   @Override
   public Response get(String vspId, String versionId, String user) throws IOException {
     Optional<Pair<String, byte[]>> zipFile = candidateManager.get(vspId, new Version(versionId));
-    String fileName = null;
+    String fileName;
     if (zipFile.isPresent()) {
       fileName = "Candidate." + zipFile.get().getLeft();
     } else {
@@ -147,14 +147,13 @@
   }
 
   @Override
-  public Response abort(String vspId, String versionId) throws Exception {
+  public Response abort(String vspId, String versionId) {
     candidateManager.abort(vspId, new Version(versionId));
     return Response.ok().build();
   }
 
   @Override
-  public Response process(String vspId, String versionId, String user)
-      throws InvocationTargetException, IllegalAccessException {
+  public Response process(String vspId, String versionId, String user) {
 
     Version version = new Version(versionId);
     OrchestrationTemplateActionResponse response = candidateManager.process(vspId, version);
@@ -162,27 +161,17 @@
     activityLogManager.logActivity(new ActivityLogEntity(vspId, version,
             ActivityType.Upload_Network_Package, user, true, "", ""));
 
-    OrchestrationTemplateActionResponseDto responseDto =
-        new OrchestrationTemplateActionResponseDto();
-    BeanUtils.copyProperties(responseDto, response);
+    OrchestrationTemplateActionResponseDto responseDto = copyOrchestrationTemplateActionResponseToDto(response);
 
     return Response.ok(responseDto).build();
   }
 
   @Override
   public Response updateFilesDataStructure(
-      String vspId, String versionId, FileDataStructureDto fileDataStructureDto, String user)
-      throws Exception {
+      String vspId, String versionId, FileDataStructureDto fileDataStructureDto, String user) {
 
-    FilesDataStructure fileDataStructure = new FilesDataStructure();
-    try {
-      BeanUtils.copyProperties(fileDataStructure, fileDataStructureDto);
-    } catch (IllegalAccessException | InvocationTargetException exception) {
-      String errorWithParameters = ErrorMessagesFormatBuilder
-          .getErrorWithParameters(Messages.MAPPING_OBJECTS_FAILURE.getErrorMessage(),
-              fileDataStructureDto.toString(), fileDataStructure.toString());
-      throw new OrchestrationTemplateCandidateException(errorWithParameters, exception);
-    }
+    FilesDataStructure fileDataStructure = copyFilesDataStructureDtoToFilesDataStructure(fileDataStructureDto);
+
     ValidationResponse response = candidateManager
         .updateFilesDataStructure(vspId, new Version(versionId), fileDataStructure);
 
@@ -195,8 +184,7 @@
   }
 
   @Override
-  public Response getFilesDataStructure(String vspId, String versionId, String user)
-      throws Exception {
+  public Response getFilesDataStructure(String vspId, String versionId, String user) {
     Optional<FilesDataStructure> filesDataStructure =
         candidateManager.getFilesDataStructure(vspId, new Version(versionId));
     if (!filesDataStructure.isPresent()) {
@@ -211,4 +199,21 @@
     return Response.ok(fileDataStructureDto).build();
   }
 
+  private OrchestrationTemplateActionResponseDto copyOrchestrationTemplateActionResponseToDto(OrchestrationTemplateActionResponse response){
+    OrchestrationTemplateActionResponseDto result = new OrchestrationTemplateActionResponseDto();
+    result.setErrors(response.getErrors());
+    result.setFileNames(response.getFileNames());
+    result.setStatus(response.getStatus());
+    return result;
+  }
+
+  private FilesDataStructure copyFilesDataStructureDtoToFilesDataStructure(FileDataStructureDto fileDataStructureDto){
+    FilesDataStructure filesDataStructure = new FilesDataStructure();
+    filesDataStructure.setArtifacts(fileDataStructureDto.getArtifacts());
+    filesDataStructure.setModules(fileDataStructureDto.getModules());
+    filesDataStructure.setNested(fileDataStructureDto.getNested());
+    filesDataStructure.setUnassigned(fileDataStructureDto.getUnassigned());
+    return filesDataStructure;
+  }
+
 }
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java
index 7d37a55..fcb668f 100644
--- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/utils/CommonUtil.java
@@ -12,14 +12,15 @@
  * 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=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdc.common.utils;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.Multimap;
 
-import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
@@ -176,27 +177,7 @@
   public static <T> Optional<T> createObjectUsingSetters(Object objectCandidate,
                                                          Class<T> classToCreate)
       throws Exception {
-    if (Objects.isNull(objectCandidate)) {
-      return Optional.empty();
-    }
-
-    Map<String, Object> objectAsMap = getObjectAsMap(objectCandidate);
-    T result = classToCreate.newInstance();
-
-    Field[] declaredFields = classToCreate.getDeclaredFields();
-    for( Field field : declaredFields){
-      if(isComplexClass(field)){
-        Optional<?> objectUsingSetters =
-            createObjectUsingSetters(objectAsMap.get(field.getName()), field.getType());
-        if( objectUsingSetters.isPresent()){
-          objectAsMap.remove(field.getName());
-          objectAsMap.put(field.getName(), objectUsingSetters.get());
-        }
-      }
-    }
-    BeanUtils.populate(result, objectAsMap);
-
-    return Optional.of(result);
+    return org.onap.sdc.tosca.services.CommonUtil.createObjectUsingSetters(objectCandidate, classToCreate);
   }
 
   private static boolean isComplexClass(Field field) {
@@ -211,15 +192,7 @@
   }
 
   public static Map<String, Object> getObjectAsMap(Object obj) {
-    Map<String, Object> objectAsMap = obj instanceof Map ? (Map<String, Object>) obj
-        : new ObjectMapper().convertValue(obj, Map.class);
-
-    if (objectAsMap.containsKey(DEFAULT)) {
-      Object defaultValue = objectAsMap.get(DEFAULT);
-      objectAsMap.remove(DEFAULT);
-      objectAsMap.put(_DEFAULT, defaultValue);
-    }
-    return objectAsMap;
+    return org.onap.sdc.tosca.services.CommonUtil.getObjectAsMap(obj);
   }
 
     public static <K, V> boolean isMultimapEmpty(Multimap<K, V> obj) {
diff --git a/pom.xml b/pom.xml
index 0df3e36..cd1db89 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,8 @@
         <ecomp.version>2.4.0</ecomp.version>
         <cassandra.unit.version>3.5.0.1</cassandra.unit.version>
         <lombok.version>1.18.2</lombok.version>
+        <commons-beanutils>1.9.3</commons-beanutils>
+        <commons-configuration>2.3</commons-configuration>
 
         <commons.collections.version>4.1</commons.collections.version>
 
