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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.10.3
    • 1.10.4
    • Data Collection - XML
    • Security Level: Default (Default Security Scheme)
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: