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

AbstractXmlCollectionHandler.parseString() doesn't handle json content

    XMLWordPrintable

    Details

    • Sprint:
      Horizon 2020 - July 22, Horizon 2020 - August 5
    • HB Backlog Status:
      Backlog

      Description

      When using the XmlCollector with a DefaultJsonCollectionHandler and posting json content, AbstractXmlCollectionHandler.parseString() will throw a java.lang.IllegalArgumentException because the content matches the pattern

      .*[{].+[}].*

      .

      This is what the entry looks like in xml-datacollection-config.xml:

            <xml-source url="https://{nodeLabel}:{parameter:port}/jolokia/">
              <request method="POST">
                <content type='application/json'><![CDATA[{"type":"read","mbean":"Catalina:type=GlobalRequestProcessor,*","attribute":["requestCount","processingTime","maxTime","errorCount","bytesSent","bytesReceived","maxTime","requestBytesReceived","requestBytesSent","requestProcessingTime"]}]]></content>
              </request>
              <import-groups>xml-datacollection/tomcat-jvm-globalrequestprocessor.xml</import-groups>
            </xml-source>
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ronald.roskens@biworldwide.com Ron Roskens
              Reporter:
              ronald.roskens@biworldwide.com Ron Roskens
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                HB Grooming Date:

                  Git Integration