+ log.error("## FATAL: CMS activator failed", e);
+ // throw new CmsException("Cannot initialize node", e);
+ }
+ }
+
+ private void initSecurity() {
+ if (System.getProperty(KernelConstants.JAAS_CONFIG_PROP) == null) {
+ URL url = getClass().getClassLoader().getResource(KernelConstants.JAAS_CONFIG);
+ // URL url =
+ // getClass().getClassLoader().getResource(KernelConstants.JAAS_CONFIG_IPA);
+ System.setProperty(KernelConstants.JAAS_CONFIG_PROP, url.toExternalForm());
+ }
+ Configuration.getConfiguration();
+ }
+
+ private void initArgeoLogger() {
+ logger = new NodeLogger(logReaderService);
+ bc.registerService(ArgeoLogger.class, logger, null);
+ }
+
+ private void initNode() throws IOException {
+ // Node state
+ Path stateUuidPath = bc.getDataFile("stateUuid").toPath();
+ String stateUuid;
+ if (Files.exists(stateUuidPath)) {
+ stateUuid = Files.readAllLines(stateUuidPath).get(0);
+ } else {
+ stateUuid = bc.getProperty(Constants.FRAMEWORK_UUID);
+ Files.write(stateUuidPath, stateUuid.getBytes());