Skip to Content
0
Former Member
Mar 16, 2005 at 09:17 AM

Displaying MBeans in the Visual Administrator

13 Views

Hi all,

I am using the SAP WAS 640 SP9 and facing problems trying to display my MBean in the Visual Administrator.

Searching at the documentation I found the following code snippet:

...

MBeanServer mbs;

MyBean mbean = new MyMBean();

...

try

{

wrapper = new BroadcastingStandardMBeanWrapper(mbean, null, p);

mbs.registerMBean(wrapper, name);

}

...

Using this code, there is a compilation error (I am using the basicadmin.jar) so I changed to:

wrapper = new BroadcastingStandardMBeanWrapper(null, MyBeanInterface.class, p);

The MBean is deployed with a EJB that registers the MBean and do some testing after the registration.

The delopyment works fine but while trying to register the MBean I got the following error:

java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method registerMBeanAtVA.

at de.pta.jmx.test.JmxTestObjectImpl0.registerMBeanAtVA(JmxTestObjectImpl0.java:336)

at de.pta.jmx.test.JmxTestObjectImpl0p4_Skel.dispatch(JmxTestObjectImpl0p4_Skel.java:109)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:291)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

Caused by: java.lang.NullPointerException

at com.sap.pj.jmx.mbeaninfo.StandardMBeanWrapper.<init>(StandardMBeanWrapper.java:217)

at com.sap.engine.services.basicadmin.mbean.BroadcastingStandardMBeanWrapper.<init>(BroadcastingStandardMBeanWrapper.java:27)

at de.pta.jmx.test.JmxTestBean.registerMBeanAtVA(JmxTestBean.java:96)

at de.pta.jmx.test.JmxTestObjectImpl0.registerMBeanAtVA(JmxTestObjectImpl0.java:320)

... 10 more

; nested exception is:

java.lang.NullPointerException

at com.sap.engine.services.ejb.exceptions.BaseRemoteException.writeReplace(BaseRemoteException.java:276)

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:324)

at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

at com.sap.engine.services.rmi_p4.DispatchImpl.throwException(DispatchImpl.java:135)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:293)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

Caused by: java.lang.NullPointerException

at com.sap.pj.jmx.mbeaninfo.StandardMBeanWrapper.<init>(StandardMBeanWrapper.java:217)

at com.sap.engine.services.basicadmin.mbean.BroadcastingStandardMBeanWrapper.<init>(BroadcastingStandardMBeanWrapper.java:27)

at de.pta.jmx.test.JmxTestBean.registerMBeanAtVA(JmxTestBean.java:96)

at de.pta.jmx.test.JmxTestObjectImpl0.registerMBeanAtVA(JmxTestObjectImpl0.java:320)

at de.pta.jmx.test.JmxTestObjectImpl0p4_Skel.dispatch(JmxTestObjectImpl0p4_Skel.java:109)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:291)

... 8 more

I found no reference for the basicadmin.jar so I deployed it with the app (otherwise I always got a ClassDefNotFoundError).

Thanks for help

Christian