-
1. Re: MBean NullPointerException
angelawhelan Apr 5, 2002 5:21 AM (in response to angelawhelan)oops sorry, the exception I get is actually this one :
javax.management.ReflectionException: The operation with name setName could not be found
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jboss.jmx.server.RMIConnectorImpl_Stub.invoke(Unknown Source)
at org.jboss.jmx.client.RMIClientConnectorImpl.invoke(RMIClientConnectorImpl.java:484)
at jboss_test.Test.runHelloMBean(Test.java:165)
at jboss_test.Test.main(Test.java:132) -
2. Re: MBean NullPointerException
adrian.brock Apr 5, 2002 5:54 AM (in response to angelawhelan)It should be
pConnector.setAttribute(name, new Attribute("Name", "David"));
Name is an attribute not an operation.
An attribute is something with one or more of the
following
Type getAttribute();
void setAttribute(Type newValue);
But
Type getSomething(Type key)
is an operation.
Look at the JMX spec or the JavaBeans spec for more info
Regards,
Adrian -
3. Re: MBean NullPointerException
angelawhelan Apr 5, 2002 6:59 AM (in response to angelawhelan)Thanks very much for your invaluable help yet again !
The code is now working :D
I will go ahead and read the documentation you suggested.
thanks again :)
A.