Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5400

There are some NPE when trying to collect data from nodes managed by Capsd

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.10.3
    • Fix Version/s: 1.10.4
    • Component/s: Data Collection - XML
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      Les Mikesell from the mailing list has reported an error related with the XML collector, when collecting data for nodes managed by Capsd.

      These nodes contains null for foreignSource and foreignId which are breaking the code for AbstractXmlCollectionHandler.parseUrl(). Here is part of the current code:

      url = url.replace("

      {nodeId}

      ", node.getNodeId());
      url = url.replace("

      {nodeLabel}

      ", node.getLabel());
      url = url.replace("

      {foreignId}

      ", node.getForeignId());
      url = url.replace("

      {foreignSource}

      ", node.getForeignSource());

      The solution is to check if the following node's parameters are null or not before calling the replace method: foreignId, foreignSource and nodeLabel.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: