XMLCollector Karaf shell error

Hi,

I am trying to poll data from Palo Alto device API. While testing adhoc collection through Karaf shell, I am running into the below error -

Error executing command: Failed reloading data for object 'org.opennms.protocols.xml.config.XmlDataCollectionConfig@de056af' from file '/usr/share/opennms/etc/xml-datacollection-config.xml'. Unexpected Throwable received while issuing reload.; nested exception is org.opennms.core.xml.MarshallingResourceFailureException: Failed to marshal/unmarshal XML file while unmarshalling an object (XmlDataCollectionConfig): javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 59; The reference to entity "cmd" must end with the ';' delimiter.]; nested exception is javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 59; The reference to entity "cmd" must end with the ';' delimiter.]

You have a structural error in your XML.

Is there a way to get more details on it from the logs?

Also, does the collectd daemon need to be reloaded everytime I make a change to xml-datacollection-config.xml and collectd-configuration.xml to take affect?

Worse, actually. I donโ€™t think reloading collectd re-reads any of the XMLCollector configuration; you have to restart OpenNMS.

Iโ€™ve found that karaf:collect will re-read the XML for testing, but that command bypasses the collectd service, and you have to restart the entire opennms service to put the changes into effect for production.