Extending the script plugin
raylite3 May 30, 2014 11:15 AMHello, I want to create a custom script plugin to monitor metrics from my application. So I created a rhq-plugin.xml (like attached) and deployed it.
But when I try to add my monitor, I see the following exception saying that the resource cannot be imported. Appreciate any pointers, thanks.
java.lang.RuntimeException:[1401462893152] javax.ejb.EJBException:java.lang.RuntimeException: Error adding [ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server]] Resource to inventory as a child of Resource[id=10001, uuid=e8d2ab5f-f5ec-47f9-93aa-359a497c394a, type={Platforms}Windows, key=kanantha, name=kanantha, parent=<null>, version=Windows 6.1] - cause: java.lang.IllegalStateException: Server specified unknown Resource type: ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server] -> java.lang.RuntimeException:Error adding [ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server]] Resource to inventory as a child of Resource[id=10001, uuid=e8d2ab5f-f5ec-47f9-93aa-359a497c394a, type={Platforms}Windows, key=kanantha, name=kanantha, parent=<null>, version=Windows 6.1] - cause: java.lang.IllegalStateException: Server specified unknown Resource type: ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server] -> java.lang.IllegalStateException:Server specified unknown Resource type: ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server]
--- STACK TRACE FOLLOWS ---
[1401462893152] javax.ejb.EJBException:java.lang.RuntimeException: Error adding [ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server]] Resource to inventory as a child of Resource[id=10001, uuid=e8d2ab5f-f5ec-47f9-93aa-359a497c394a, type={Platforms}Windows, key=kanantha, name=kanantha, parent=<null>, version=Windows 6.1] - cause: java.lang.IllegalStateException: Server specified unknown Resource type: ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server] -> java.lang.RuntimeException:Error adding [ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server]] Resource to inventory as a child of Resource[id=10001, uuid=e8d2ab5f-f5ec-47f9-93aa-359a497c394a, type={Platforms}Windows, key=kanantha, name=kanantha, parent=<null>, version=Windows 6.1] - cause: java.lang.IllegalStateException: Server specified unknown Resource type: ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server] -> java.lang.IllegalStateException:Server specified unknown Resource type: ResourceType[id=10639, name=Script, plugin=my-monitor, category=Server]
at Unknown.Throwable_0(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@22)
at Unknown.Exception_0(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@15)
at Unknown.RuntimeException_0(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@15)
at Unknown.instantiate_32(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@10)
at Unknown.$instantiate_0(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@35)
at Unknown.$instantiate(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@36)
at Unknown.$readObject(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@119)
at Unknown.$onResponseReceived(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@453)
at Unknown.onResponseReceived_6(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@31)
at Unknown.$fireOnResponseReceived(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@14)
at Unknown.onReadyStateChange_0(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@51)
at Unknown.<anonymous>(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@13)
at Unknown.apply(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@21)
at Unknown.entry0(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@16)
at Unknown.<anonymous>(http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/565E0854639ECD736C38967C4D7173DE.cache.html@14)
-
rhq-plugin.xml 9.7 KB