Not able to pass signature through pyjolokia(Python) to Jolokia

classic Classic list List threaded Threaded
1 message Options
piyush6045 piyush6045
Reply | Threaded
Open this post in threaded view
|

Not able to pass signature through pyjolokia(Python) to Jolokia

Hi , I am new to jolokia and wants a following code to work:

from pyjolokia import Jolokia

resp=j4p.request(type = 'exec', mbean='java.lang:type=Threading',operation='getThreadInfo', arguments = [True,True])

print(resp)

However, the code is not working as giving me below error :

{'request': {'mbean': 'java.lang:type=Threading', 'arguments': [True, True], 'type': 'exec', 'operation': 'getThreadInfo'}, 'stacktrace': 'java.lang.IllegalArgumentException: Operation getThreadInfo on MBean java.lang:type=Threading is overloaded. Signatures found: ([J,boolean,boolean),(long,int),(long),([J),([J,int). Use a signature when specifying the operation.\r\n\tat org.jolokia.handler.ExecHandler.extractOperationTypes(ExecHandler.java:139)\r\n\tat org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:84)\r\n\tat org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)\r\n\tat org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)\r\n\tat org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)\r\n\tat org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:161)\r\n\tat org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:99)\r\n\tat org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:429)\r\n\tat org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)\r\n\tat org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)\r\n\tat org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:137)\r\n\tat org.jolokia.http.AgentServlet$3.handleRequest(AgentServlet.java:460)\r\n\tat org.jolokia.http.AgentServlet.handleSecurely(AgentServlet.java:350)\r\n\tat org.jolokia.http.AgentServlet.handle(AgentServlet.java:321)\r\n\tat org.jolokia.http.AgentServlet.doPost(AgentServlet.java:284)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)\r\n\tat org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n\tat org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)\r\n\tat org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n\tat org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)\r\n\tat org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n\tat java.lang.Thread.run(Unknown Source)\r\n', 'error_type': 'java.lang.IllegalArgumentException', 'error': 'java.lang.IllegalArgumentException : Operation getThreadInfo on MBean java.lang:type=Threading is overloaded. Signatures found: ([J,boolean,boolean),(long,int),(long),([J),([J,int). Use a signature when specifying the operation.', 'status': 400}

I tried many ways to pass the signature but failed.

Can anyone help on this.