Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1783

NCMP fails to restart due to uncaught exception saving /subscription-registry

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Montreal Release
    • Montreal Release
    • NCMP
    • None

      NCMP fails to start if '/subscription-registry' already exists, due to incorrect exception being caught:

      try {
          cpsDataService.saveData(dataspaceName, anchorName, nodeData, OffsetDateTime.now());
      } catch (final AlreadyDefinedException exception) {
          log.info("Creating new data node '{}' failed as data node already exists", dataNodeName);
      } catch (final Exception exception) {
          log.debug("Creating data node for subscription model failed: {}", exception.getMessage());
          throw new NcmpStartUpException("Creating data node failed", exception.getMessage());
      } 

      But cpsDataService.saveData throws AlreadyDefinedExceptionBatch, not AlreadyDefinedException.

            danielhanrahan Daniel Hanrahan
            danielhanrahan Daniel Hanrahan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: