diff --git a/features/ccsdk-sli-adaptors-all/pom.xml b/features/ccsdk-sli-adaptors-all/pom.xml
index 68ad0f7..1e3ba8a 100644
--- a/features/ccsdk-sli-adaptors-all/pom.xml
+++ b/features/ccsdk-sli-adaptors-all/pom.xml
@@ -44,6 +44,7 @@
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
+        -->
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>ccsdk-grpc-client</artifactId>
@@ -51,7 +52,6 @@
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
-        -->
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>ccsdk-netbox-client</artifactId>
diff --git a/grpc-resource/provider/pom.xml b/grpc-resource/provider/pom.xml
index 9c0a4a0..c567bba 100644
--- a/grpc-resource/provider/pom.xml
+++ b/grpc-resource/provider/pom.xml
@@ -106,6 +106,12 @@
             <version>${grpc.version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
         <!-- Testing -->
         <dependency>
             <groupId>junit</groupId>
diff --git a/grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcProperties.java b/grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcProperties.java
index fef1a59..96775f3 100644
--- a/grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcProperties.java
+++ b/grpc-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/grpc/GrpcProperties.java
@@ -15,100 +15,62 @@
  */
 package org.onap.ccsdk.sli.adaptors.grpc;
 
-import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
-import java.util.HashSet;
-import java.util.Optional;
+import java.io.InputStream;
+import java.net.URL;
 import java.util.Properties;
-import java.util.Set;
-import org.onap.ccsdk.sli.core.utils.JREFileResolver;
-import org.onap.ccsdk.sli.core.utils.KarafRootFileResolver;
-import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver;
-import org.onap.ccsdk.sli.core.utils.common.BundleContextFileResolver;
-import org.onap.ccsdk.sli.core.utils.common.SdncConfigEnvVarFileResolver;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * Responsible for determining the properties file to use.
- *
- * <ol>
- * <li>A directory identified by the system environment variable <code>SDNC_CONFIG_DIR</code></li>
- * <li>A directory identified by the JRE argument <code>grpc.properties</code></li>
- * <li>A <code>grpc.properties</code> file located in the karaf root directory</li>
- * </ol>
- *
- * Partial copy and adaptation of org.onap.ccsdk.sli.adaptors.aai.AAIServiceProvider
- */
 public class GrpcProperties {
 
     private static final Logger LOG = LoggerFactory.getLogger(GrpcProperties.class);
 
     private static final String GRPC_PROPERTY_FILE_NAME = "grpc.properties";
-    private static final String MISSING_PROPERTY_FILE =
-        "Missing configuration properties resource for GRPC: " + GRPC_PROPERTY_FILE_NAME;
+    private static final String DEFAULT_PROPERTIES_DIR = "/opt/onap/ccsdk/data/properties";
+    private static final String PROPERTIES_DIR_KEY = "SDNC_CONFIG_DIR";
+
     private static final String BLUEPRINT_PROCESSOR_URL_PROP = "org.onap.ccsdk.sli.adaptors.grpc.blueprint.processor.url";
     private static final String BLUEPRINT_PROCESSOR_PORT_PROP = "org.onap.ccsdk.sli.adaptors.grpc.blueprint.processor.port";
 
-    private Set<PropertiesFileResolver> fileResolvers = new HashSet<>();
     private Properties properties;
 
     public GrpcProperties() {
-        fileResolvers.add(new SdncConfigEnvVarFileResolver("Using property file (1) from environment variable"));
-        fileResolvers.add(new BundleContextFileResolver("Using property file (2) from BundleContext property",
-            GrpcProperties.class));
-        fileResolvers.add(new JREFileResolver("Using property file (3) from JRE argument", GrpcProperties.class));
-        fileResolvers.add(new KarafRootFileResolver("Using property file (4) from karaf root", this));
-
         loadProps();
     }
 
     public String getUrl() {
-        checkArgument(properties != null);
         return properties.getProperty(BLUEPRINT_PROCESSOR_URL_PROP);
     }
 
     public int getPort() {
-        checkArgument(properties != null);
         return Integer.parseInt(properties.getProperty(BLUEPRINT_PROCESSOR_PORT_PROP));
     }
 
-    private void checkArgument(final boolean argument) {
-        if (!argument) {
-            LOG.info("Propety file {} was missing, trying to reload it", GRPC_PROPERTY_FILE_NAME);
-            loadProps();
-            if (properties == null) {
-                throw new IllegalArgumentException(MISSING_PROPERTY_FILE);
-            }
-        }
-    }
-
     private void loadProps() {
-        // determines properties file as according to the priority described in the class header comment
-        final File propertiesFile = determinePropertiesFile();
-        if (propertiesFile != null) {
-            try (FileInputStream fileInputStream = new FileInputStream(propertiesFile)) {
-                properties = new Properties();
-                properties.load(fileInputStream);
-            } catch (final IOException e) {
-                String errorMsg = "Failed to load properties for file: " + propertiesFile.toString();
-                LOG.error(errorMsg, errorMsg);
+        properties = new Properties();
+        // Try to load config from dir
+        final String ccsdkConfigDir =
+            System.getProperty(PROPERTIES_DIR_KEY, DEFAULT_PROPERTIES_DIR) + "/" + GRPC_PROPERTY_FILE_NAME;
+        try (FileInputStream in = new FileInputStream(ccsdkConfigDir)) {
+            properties.load(in);
+            LOG.info("Loaded {} properties from file {}", properties.size(), ccsdkConfigDir);
+        } catch (Exception e) {
+            // Try to load config from jar
+            final Bundle bundle = FrameworkUtil.getBundle(GrpcProperties.class);
+            final BundleContext ctx = bundle.getBundleContext();
+            final URL url = ctx.getBundle().getResource(GRPC_PROPERTY_FILE_NAME);
+
+            try (InputStream inputStream = url.openStream()) {
+                properties.load(inputStream);
+                LOG.info("Loaded {} properties from file {}", properties.size(), GRPC_PROPERTY_FILE_NAME);
+            } catch (IOException e1) {
+                LOG.error("Failed to load properties for file: {} " + GRPC_PROPERTY_FILE_NAME, e1);
             }
         }
     }
-
-    private File determinePropertiesFile() {
-        for (final PropertiesFileResolver resolver : fileResolvers) {
-            final Optional<File> fileOptional = resolver.resolveFile(GRPC_PROPERTY_FILE_NAME);
-            if (fileOptional.isPresent()) {
-                final File file = fileOptional.get();
-                LOG.info("{} {}", resolver.getSuccessfulResolutionMessage(), file.getPath());
-                return file;
-            }
-        }
-
-        LOG.error(MISSING_PROPERTY_FILE);
-        return null;
-    }
 }
diff --git a/grpc-resource/provider/src/main/resources/grpc.properties b/grpc-resource/provider/src/main/resources/grpc.properties
old mode 100755
new mode 100644
index 2d4e795..650910e
--- a/grpc-resource/provider/src/main/resources/grpc.properties
+++ b/grpc-resource/provider/src/main/resources/grpc.properties
@@ -1,4 +1,5 @@
-# Copyright (C) 2019 Bell Canada
+#
+# Copyright (C) 2019 Bell Canada.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,5 +12,6 @@
 # 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.
+#
 org.onap.ccsdk.sli.adaptors.grpc.blueprint.processor.url=blueprint-processor
-org.onap.ccsdk.sli.adaptors.grpc.blueprint.processor.port=9111
\ No newline at end of file
+org.onap.ccsdk.sli.adaptors.grpc.blueprint.processor.port=9111
diff --git a/netbox-client/provider/pom.xml b/netbox-client/provider/pom.xml
index 3af22ed..f7e8ccf 100644
--- a/netbox-client/provider/pom.xml
+++ b/netbox-client/provider/pom.xml
@@ -79,6 +79,11 @@
             <version>${project.version}</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
         <!--Testing-->
         <dependency>
@@ -111,11 +116,6 @@
             <version>1.2.3</version>
             <scope>test</scope>
         </dependency>
-		<dependency>
-			<groupId>org.osgi</groupId>
-			<artifactId>org.osgi.core</artifactId>
-			<scope>test</scope>
-		</dependency>
     </dependencies>
 
     <build>
diff --git a/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java b/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java
index ee493ec..2eecf6e 100644
--- a/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java
+++ b/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java
@@ -15,102 +15,62 @@
  */
 package org.onap.ccsdk.sli.adaptors.netbox.property;
 
-import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
-import java.util.HashSet;
-import java.util.Optional;
+import java.io.InputStream;
+import java.net.URL;
 import java.util.Properties;
-import java.util.Set;
-
-import org.onap.ccsdk.sli.adaptors.netbox.api.IpamException;
-import org.onap.ccsdk.sli.core.utils.JREFileResolver;
-import org.onap.ccsdk.sli.core.utils.KarafRootFileResolver;
-import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver;
-import org.onap.ccsdk.sli.core.utils.common.BundleContextFileResolver;
-import org.onap.ccsdk.sli.core.utils.common.SdncConfigEnvVarFileResolver;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * Responsible for determining the properties file to use.
- *
- * <ol>
- * <li>A directory identified by the system environment variable <code>SDNC_CONFIG_DIR</code></li>
- * <li>A directory identified by the JRE argument <code>netbox.properties</code></li>
- * <li>A <code>netbox.properties</code> file located in the karaf root directory</li>
- * </ol>
- *
- * Partial copy and adaptation of org.onap.ccsdk.sli.adaptors.aai.AAIServiceProvider
- */
 public class NetboxProperties {
 
     private static final Logger LOG = LoggerFactory.getLogger(NetboxProperties.class);
 
     private static final String NETBOX_PROPERTY_FILE_NAME = "netbox.properties";
-    private static final String MISSING_PROPERTY_FILE =
-        "Missing configuration properties resource for Netbox: " + NETBOX_PROPERTY_FILE_NAME;
+    private static final String DEFAULT_PROPERTIES_DIR = "/opt/onap/ccsdk/data/properties";
+    private static final String PROPERTIES_DIR_KEY = "SDNC_CONFIG_DIR";
+
     private static final String NETBOX_URL_PROP = "org.onap.ccsdk.sli.adaptors.netbox.url";
     private static final String NETBOX_API_KEY_PROP = "org.onap.ccsdk.sli.adaptors.netbox.apikey";
 
-    private Set<PropertiesFileResolver> fileResolvers = new HashSet<>();
     private Properties properties;
 
     public NetboxProperties() {
-        fileResolvers.add(new SdncConfigEnvVarFileResolver("Using property file (1) from environment variable"));
-        fileResolvers.add(new BundleContextFileResolver("Using property file (2) from BundleContext property",
-            NetboxProperties.class));
-        fileResolvers.add(new JREFileResolver("Using property file (3) from JRE argument", NetboxProperties.class));
-        fileResolvers.add(new KarafRootFileResolver("Using property file (4) from karaf root", this));
-
         loadProps();
     }
 
     public String getHost() {
-        checkArgument(properties != null);
         return properties.getProperty(NETBOX_URL_PROP);
     }
 
     public String getApiKey() {
-        checkArgument(properties != null);
         return properties.getProperty(NETBOX_API_KEY_PROP);
     }
 
-    private void checkArgument(final boolean argument) {
-        if (!argument) {
-            LOG.info("Propety file {} was missing, trying to reload it", NETBOX_PROPERTY_FILE_NAME);
-            loadProps();
-            if (properties == null) {
-                throw new IllegalArgumentException(MISSING_PROPERTY_FILE);
-            }
-        }
-    }
-
     private void loadProps() {
-        // determines properties file as according to the priority described in the class header comment
-        final File propertiesFile = determinePropertiesFile();
-        if (propertiesFile != null) {
-            try (FileInputStream fileInputStream = new FileInputStream(propertiesFile)) {
-                properties = new Properties();
-                properties.load(fileInputStream);
-            } catch (final IOException e) {
-                String errorMsg = "Failed to load properties for file: " + propertiesFile.toString();
-                LOG.error(errorMsg, new IpamException(errorMsg));
+        properties = new Properties();
+        // Try to load config from dir
+        final String ccsdkConfigDir =
+            System.getProperty(PROPERTIES_DIR_KEY, DEFAULT_PROPERTIES_DIR) + "/" + NETBOX_PROPERTY_FILE_NAME;
+        try (FileInputStream in = new FileInputStream(ccsdkConfigDir)) {
+            properties.load(in);
+            LOG.info("Loaded {} properties from file {}", properties.size(), ccsdkConfigDir);
+        } catch (Exception e) {
+            // Try to load config from jar
+            final Bundle bundle = FrameworkUtil.getBundle(NetboxProperties.class);
+            final BundleContext ctx = bundle.getBundleContext();
+            final URL url = ctx.getBundle().getResource(NETBOX_PROPERTY_FILE_NAME);
+
+            try (InputStream inputStream = url.openStream()) {
+                properties.load(inputStream);
+                LOG.info("Loaded {} properties from file {}", properties.size(), NETBOX_PROPERTY_FILE_NAME);
+            } catch (IOException e1) {
+                LOG.error("Failed to load properties for file: {} " + NETBOX_PROPERTY_FILE_NAME, e1);
             }
         }
     }
-
-    private File determinePropertiesFile() {
-        for (final PropertiesFileResolver resolver : fileResolvers) {
-            final Optional<File> fileOptional = resolver.resolveFile(NETBOX_PROPERTY_FILE_NAME);
-            if (fileOptional.isPresent()) {
-                final File file = fileOptional.get();
-                LOG.info("{} {}", resolver.getSuccessfulResolutionMessage(), file.getPath());
-                return file;
-            }
-        }
-
-        LOG.error(MISSING_PROPERTY_FILE, new IpamException(MISSING_PROPERTY_FILE));
-        return null;
-    }
 }
diff --git a/netbox-client/provider/src/test/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxPropertiesTest.java b/netbox-client/provider/src/test/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxPropertiesTest.java
deleted file mode 100644
index be5aabf..0000000
--- a/netbox-client/provider/src/test/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxPropertiesTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2018 Bell Canada.
- *
- * 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.
- */
-package org.onap.ccsdk.sli.adaptors.netbox.property;
-
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import ch.qos.logback.core.Appender;
-import java.util.List;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-import org.slf4j.LoggerFactory;
-
-@RunWith(MockitoJUnitRunner.class)
-public class NetboxPropertiesTest {
-
-    private NetboxProperties props;
-
-    @Mock
-    private Appender<ILoggingEvent> appender;
-    @Captor
-    private ArgumentCaptor<ILoggingEvent> captor;
-
-    @Before
-    public void setup() {
-        ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory
-            .getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
-        logger.addAppender(appender);
-    }
-
-    @Test
-    public void testMissingFile() {
-        props = new NetboxProperties();
-
-        verifyLogEntry(
-            "Missing configuration properties resource for Netbox: netbox.properties");
-    }
-
-    private void verifyLogEntry(String message) {
-        verify(appender, times(1)).doAppend(captor.capture());
-        List<ILoggingEvent> allValues = captor.getAllValues();
-        for (ILoggingEvent loggingEvent : allValues) {
-            Assert.assertTrue(loggingEvent.getFormattedMessage().contains(message));
-        }
-    }
-}
\ No newline at end of file
