Fixed
Details
Assignee
Jesse WhiteJesse WhiteReporter
Jesse WhiteJesse WhiteSprint
NoneFix versions
Priority
Major
Details
Details
Assignee
Jesse White
Jesse WhiteReporter
Jesse White
Jesse WhiteSprint
None
Fix versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created July 26, 2018 at 8:45 PM
Updated September 4, 2018 at 3:02 PM
Resolved September 4, 2018 at 3:02 PM
I encountered the following exception when trying to use the JSON handler with the XML collector on Minion:
admin@opennms> collection:collect -n 137 org.opennms.protocols.xml.collector.XmlCollector 172.20.1.61 collection=json-bamboo-agent-stats handler-class=org.opennms.protocols.json.collector.DefaultJsonCol[39/1970] ndler Collect failed with:java.util.concurrent.ExecutionException: org.opennms.core.rpc.api.RemoteExecutionException: java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: net/sf/json/JSONSerialize r at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: net/sf/json/JSONSerializer at org.opennms.protocols.json.collector.AbstractJsonCollectionHandler.getJSONObject(AbstractJsonCollectionHandler.java:184) at org.opennms.protocols.json.collector.DefaultJsonCollectionHandler.fillCollectionSet(DefaultJsonCollectionHandler.java:49) at org.opennms.protocols.xml.collector.AbstractXmlCollectionHandler.collect(AbstractXmlCollectionHandler.java:178) at org.opennms.protocols.xml.collector.XmlCollector.collect(XmlCollector.java:257) at Proxy201c535a_1150_4dbf_b5b4_b596d9e5d7a7.collect(Unknown Source) at org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule$1.get(CollectorClientRpcModule.java:83) at org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule$1.get(CollectorClientRpcModule.java:77) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ... 3 more at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at org.opennms.netmgt.collection.commands.CollectCommand.execute(CollectCommand.java:169) at org.opennms.netmgt.collection.commands.CollectCommand.execute(CollectCommand.java:73) at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.opennms.core.rpc.api.RemoteExecutionException: java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: net/sf/json/JSONSerializer at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: net/sf/json/JSONSerializer at org.opennms.protocols.json.collector.AbstractJsonCollectionHandler.getJSONObject(AbstractJsonCollectionHandler.java:184) at org.opennms.protocols.json.collector.DefaultJsonCollectionHandler.fillCollectionSet(DefaultJsonCollectionHandler.java:49) at org.opennms.protocols.xml.collector.AbstractXmlCollectionHandler.collect(AbstractXmlCollectionHandler.java:178) at org.opennms.protocols.xml.collector.XmlCollector.collect(XmlCollector.java:257) at Proxy201c535a_1150_4dbf_b5b4_b596d9e5d7a7.collect(Unknown Source)