Mantis - Resin
Viewing Issue Advanced Details
54 minor always 03-23-05 00:00 05-11-05 00:00
user82  
 
immediate  
closed 3.0.12  
3.0.12 fixed  
none    
none 3.0.13  
0000054: Problem with JMX newProxyInstance call with jdk1.5.0_02
RSN-45
I have been using the following code to get a proxy for a MBean:

MBeanServerInvocationHandler.newProxyInstance(MBeanServer, ObjectName, ClassLoader, false);

It worked fine with jdk1.4.2_06, but when I used jdk1.5.0_02 I see the following stacktrace:

java.lang.IllegalArgumentException: com.caucho.jmx.MBeanServerDelegateImpl is not an interface
        at java.lang.reflect.Proxy.getProxyClass(Proxy.java:354)
        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:564)
        at javax.management.MBeanServerInvocationHandler.newProxyInstance(MBeanServerInvocationHandler.java:149)
...
jdk1.5.0_02

Notes
(0000057)
user82   
03-23-05 00:00   
I have added a full snippet of the code below:

MBeanServer mbs = getMBeanServer();
MBeanInfo info = mbs.getMBeanInfo(name);
String className = info.getClassName();
Class cl = getClassLoader().loadClass(className);

 MBeanServerInvocationHandler.newProxyInstance(mbs, name, cl, false);
(0000058)
ferg   
03-23-05 00:00   
server/2184