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

JsonCollectionHandler does not handle list responses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 16.0.3
    • Fix Version/s: 20.0.0
    • Component/s: Data Collection - HTTP
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - May 3rd, Horizon - May 10th, Horizon - May 17th

      Description

      The JSON Collection Handler from the Xml Collector does not handle JSON list responses:

      Caused by: net.sf.json.JSONException: A JSONObject text must begin with '{' at character 1 of [{"request":{"mbean":"tomcat.jdbc:*","attribute":["InitialSize","NumActive","MaxActive","NumIdle","MinIdle","MaxIdle","Username","Url","DriverClassName"],"type":"read"},....}]
              at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:527) ~[json-lib-2.2.3-jdk15.jar:?]
              at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:1112) ~[json-lib-2.2.3-jdk15.jar:?]
              at net.sf.json.JSONObject._fromString(JSONObject.java:1337) ~[json-lib-2.2.3-jdk15.jar:?]
              at net.sf.json.JSONObject.fromObject(JSONObject.java:187) ~[json-lib-2.2.3-jdk15.jar:?]
              at net.sf.json.JSONObject.fromObject(JSONObject.java:156) ~[json-lib-2.2.3-jdk15.jar:?]
              at org.opennms.protocols.json.collector.AbstractJsonCollectionHandler.getJSONObject(AbstractJsonCollectionHandler.java:188) ~[org.opennms.protocols.xml-16.0.3.jar:?]
              at org.opennms.protocols.json.collector.DefaultJsonCollectionHandler.fillCollectionSet(DefaultJsonCollectionHandler.java:53) ~[org.opennms.protocols.xml-16.0.3.jar:?]
              at org.opennms.protocols.xml.collector.AbstractXmlCollectionHandler.collect(AbstractXmlCollectionHandler.java:189) ~[org.opennms.protocols.xml-16.0.3.jar:?]
              at org.opennms.protocols.xml.collector.XmlCollector.collect(XmlCollector.java:168) ~[org.opennms.protocols.xml-16.0.3.jar:?]
              ... 12 more
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: