-
1. Re: Question about
bschaefer May 18, 2006 2:56 AM (in response to bschaefer)Hello,
Excuse me, I described the wrong Exception:ObjectName theName = new ObjectName("jboss.jca:name=DefaultDS,service=ManagedConnectionFactory"); MBeanInfo infor = server.getMBeanInfo(theName);
throws the Exception:java.lang.reflect.UndeclaredThrowableException at $Proxy0.getMBeanInfo(Unknown Source) at test.myIndipendend.main(myIndipendend.java:92) Caused by: java.io.StreamCorruptedException: Null descriptor? at javax.management.modelmbean.DescriptorSupport.readObject(DescriptorSupport.java:538) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
and the Operations-InvokationInteger into = (Integer)server.invoke(invokeName, "getSize",null,null); ObjectName[] names = {invokeName}; String stringo = (String)server.invoke(invokeName, "get",names,new String[]{"javax.management.ObjectName"});
throwsjava.lang.reflect.UndeclaredThrowableException at $Proxy0.invoke(Unknown Source) at test.myIndipendend.main(myIndipendend.java:101) Caused by: java.io.NotSerializableException: org.jboss.mx.server.registry.MBeanEntry at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) ...
The problem remains the same...
Best regards,
Bastian -
2. Re: Question about
dimitris May 18, 2006 3:35 AM (in response to bschaefer)The jmx-console doesn't have a problem with non-serializable attribute values because it accesses them in the same jvm, so they are not serialized.
-
3. Re: Question about
bschaefer May 18, 2006 3:49 AM (in response to bschaefer)Thanks Dimitris.
Is there any way for me to get the Attribute without serialization (without rmi).
Best regards,
bastian -
4. Re: Question about
dimitris May 18, 2006 4:45 AM (in response to bschaefer)I believe this would work if the jboss jmx libraries are used (i.e. jdk1.4).
-
5. Re: Question about
bschaefer May 19, 2006 4:20 AM (in response to bschaefer)Hello,
This does not help me further.
I try do do something different now.
How can I use the mx4j HTTP-Adaptor with Jboss?
I am not able to register my http-Adaptor Bean as described in the mx4j Manual.
http://mx4j.sourceforge.net/docs/ch05.html
I use:InitialContext ic = new InitialContext(); this.server = (RMIAdaptor) ic.lookup("jmx/invoker/RMIAdaptor");
and then to register the http-adaptor:ObjectName nameHttp = new ObjectName("Server:name=HttpAdaptor"); indi.server.createMBean("mx4j.tools.adaptor.http.HttpAdaptor", nameHttp, null); server.setAttribute(nameHttp, new Attribute("Port", new Integer("8080"))); server.setAttribute(nameHttp, new Attribute("Host", "localhost")); server.invoke(nameHttp, "start", null, null);
getting the Excetion:RuntimeErrorException: instantiating mx4j.tools.adaptor.http.HttpAdaptor failed: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration Cause: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration at org.jboss.mx.server.MBeanServerImpl.handleInstantiateExceptions(MBeanServerImpl.java:942) at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:875) at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:290) at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:267) at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:310) ...
Best regards -
6. Re: Question about
dimitris May 19, 2006 6:12 AM (in response to bschaefer)mx4j should have instructions of some sort, but in any case, this should be done on the server side either through proper packaging of the adaptor in a .sar, or if this is not possible through wrapping with a custom jboss mbean.