Log missing preloaded policy and continue
[policy/api.git] / main / src / main / java / org / onap / policy / api / main / startstop / ApiDatabaseInitializer.java
index cbd89cb..4cbfd06 100644 (file)
@@ -114,7 +114,8 @@ public class ApiDatabaseInitializer {
         for (String entity : entities) {
             String entityAsStringYaml = ResourceUtils.getResourceAsString(entity);
             if (entityAsStringYaml == null) {
-                throw new PolicyApiException("Preloading entity cannot be found: " + entity);
+                LOGGER.warn("Preloading entity cannot be found: " + entity);
+                continue;
             }
 
             ToscaServiceTemplate singleEntity =
@@ -150,4 +151,4 @@ public class ApiDatabaseInitializer {
     protected interface FunctionWithEx<T, R> {
         public R apply(T value) throws PfModelException;
     }
-}
\ No newline at end of file
+}