Hi All,
I am trying to figure out a way to register a
customized StandardMBean in all cluster nodes.
Unfortunately I don't manage to register my mbean in
dispatcher MBeanServer as it doesn't have the MBean classloader.
Currently I am registering the MBeans from a servlet so
the server classloader is aware of the MBean (it is
deployed together with the servlet in the EAR file), but
the dispatcher node isn't.
I am using javax.management.MBeanServerConnection to
obtain connection to the remote MBean server.
Then I am using the createMBean(..) method to istantiate
and register the MBean in the remote MBeanServer.
Could someone give me a hint how to add my MBean to the
dispatcher classloader. Any alternatives will be also
appreciated.
This is the exception I get when trying to register the
MBean in the dispatcher MBeanServer:
com.sap.engine.services.jmx.exception.JmxConnectorException:
Unable to de-serialize request parameters, message [ JMX request
(java) v1.0 len: 323 | src: cluster target-node: 505798100 req:
createMBean(S,ON,ON) params-number: 3 params-bytes: 0 | com.abc.jmx.MyMBean :name=MyName,j2eeType=ABC_MyType,SAP_J2EEClusterNode=505798100,SAP_J2EECluster=""
:name="abc.com/MyLoader",j2eeType=SAP_J2EEClassLoader,SAP_J2EEClusterNode="",SAP_J2EECluster="" ] at
com.sap.engine.services.jmx.RequestMessage.readParams(RequestMessage.java:526) at
com.sap.engine.services.jmx.RequestMessage.getParams(RequestMessage.java:575) at
com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:106) at
com.sap.engine.services.jmx.JmxServiceConnectorServer.receiveWait(JmxServiceConnectorServer.java:173) at com.sap.engine.core.service630.context.cluster.message.MessageListenerWrapper.process(MessageListenerWrapper.java:81) at
com.sap.engine.core.cluster.impl6.ms.MSListenerThread.run(MSListenerThread.java:47) at
com.sap.engine.frame.core.thread.Task.run(Task.java:60)
at com.sap.engine.core.thread.impl6.SingleThread.execute(SingleThread.java:72) at
com.sap.engine.core.thread.impl6.SingleThread.run(SingleThread.java:142) <b>Caused by:
javax.management.InstanceNotFoundException: ClassLoader with name :name="abc.com/MyLoader",j2eeType=SAP_J2EEClassLoader,SAP_J2EEClusterNode="",SAP_J2EECluster="" not found in repository at com.sap.engine.services.jmx.CompletionInterceptor.getClassLoader(CompletionInterceptor.java:556) at com.sap.engine.services.jmx.RedirectInterceptor.getClassLoader(RedirectInterceptor.java:493) at
com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.getClassLoader(MBeanServerInterceptorChain.java:435) at com.sap.engine.services.jmx.RequestMessage.readParams
(RequestMessage.java:515) ... 8 more -
predecessor system -
com.sap.engine.services.jmx.exception.JmxConnectorException: Unable to de-serialize request parameters, message
[ JMX request (java) v1.0 len: 323 | src: cluster target-node: 505798100 req: createMBean(S,ON,ON)
params-number: 3 params-bytes: 0 | com.abc.jmx.MyMBean :name=MyName,j2eeType=ABC_MyType,SAP_J2EEClusterNode=505798100,SAP_J2EECluster=""
:name="abc.com/MyLoader",j2eeType=SAP_J2EEClassLoader,SAP_J2EEClusterNode="",SAP_J2EECluster="" ] at com.sap.engine.services.jmx.MBeanServerConnectionImpl.invokeMbsInternal(MBeanServerConnectionImpl.java:677) at com.sap.engine.services.jmx.MBeanServerConnectionImpl.createMBean(MBeanServerConnectionImpl.java:105) at
com.sap.engine.services.jmx.MBeanServerConnectionSecurityWrapper.createMBean(MBeanServerConnectionSecurityWrapper.java:95) at ...
Dan
Message was edited by: Dan Sobol