dgriffon commented on code in PR #704: URL: https://github.com/apache/unomi/pull/704#discussion_r1815048021
########## tools/shell-commands/src/main/java/org/apache/unomi/shell/services/internal/UnomiManagementServiceImpl.java: ########## @@ -38,26 +40,32 @@ @Component(service = UnomiManagementService.class, immediate = true) public class UnomiManagementServiceImpl implements UnomiManagementService { + private static final Logger LOGGER = LoggerFactory.getLogger(UnomiManagementServiceImpl.class.getName()); + private BundleContext bundleContext; - + @Reference(cardinality = ReferenceCardinality.MANDATORY) private MigrationService migrationService; - + private final List<String> bundleSymbolicNames = new ArrayList<>(); private List<String> reversedBundleSymbolicNames; @Activate public void init(ComponentContext componentContext) throws Exception { - this.bundleContext = componentContext.getBundleContext(); - initReversedBundleSymbolicNames(); + try { + this.bundleContext = componentContext.getBundleContext(); + initReversedBundleSymbolicNames(); - if (StringUtils.isNotBlank(bundleContext.getProperty("unomi.autoMigrate"))) { - migrationService.migrateUnomi(bundleContext.getProperty("unomi.autoMigrate"), true, null); - } + if (StringUtils.isNotBlank(bundleContext.getProperty("unomi.autoMigrate"))) { + migrationService.migrateUnomi(bundleContext.getProperty("unomi.autoMigrate"), true, null); + } - if (StringUtils.isNotBlank(bundleContext.getProperty("unomi.autoStart")) && - bundleContext.getProperty("unomi.autoStart").equals("true")) { - startUnomi(); + if (StringUtils.isNotBlank(bundleContext.getProperty("unomi.autoStart")) && + bundleContext.getProperty("unomi.autoStart").equals("true")) { + startUnomi(); + } + } catch (Exception e) { + LOGGER.error("Error while starting Unomi", e); Review Comment: This seems to catch more than a starting Unomi exception. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@unomi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org