History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RHQ-574
Type: Bug Bug
Status: Accepted Accepted
Priority: Major Major
Assignee: Unassigned
Reporter: John Mazzitelli
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RHQ Project

operations can't have a list of maps for parameters

Created: 12/Jun/08 02:23 AM   Updated: 19/Jul/08 06:03 PM
Component/s: FX - Operations
Affects Version/s: 1.0.1
Fix Version/s: None

Time Tracking:
Not Specified

Date of First Response: 13/Jun/08 01:08 PM


 Description  « Hide
Put this operation definition in a plugin descriptor:

        <operation name="InvokeMethod"
            <parameters>
                <c:simple-property name="methodName" type="string" />
                <c:list-property name="parameters" required="false">
                    <c:map-property name="parameter">
                        <c:simple-property name="name" type="string" />
                        <c:simple-property name="value" type="string" />
                    </c:map-property>
                </c:list-property>
            </parameters>
            <results>
                <c:simple-property name="results" type="longString"/>
            </results>
        </operation>

Now try to immediately schedule that operation. The screen renders OK, but I cannot add any parameters. I hit the "add" button in the map rendering, but it doesn't do anything. I submit the operation anyway and I get a failure, a non-descript NPE in the stack trace.

org.rhq.core.clientapi.agent.PluginContainerException: Failed to submit invocation request. resource=[500051], operation=[InvokeRestMethod], jobId=[rhq-resource-500051-1435506829-1213254974555_=_rhq-resource-500051_=_1213254975416]
at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:149)
at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
at $Proxy1.execute(Unknown Source)
at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:335)
at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:230)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
Caused by: java.lang.NullPointerException: [Warning] null
... 23 more

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Joseph Marques - 13/Jun/08 01:08 PM
mazz, do any existing operations have a definition like this, or is this only for a custom plugin you're writing now?

John Mazzitelli - 13/Jun/08 01:09 PM
i think i'm the first to try this. I don't know of any other plugins that (try to) do this.