There seems to be something very broken about the Felix classloader.
I have a java.lang.reflect.Proxy implementing method:
public ObjectName[] getChildren();
My handler returns a non-null ObjectName[] as it should. After that,
it goes haywire:
===> the Felix classloader says it cannot find a standard JDK class:
javax.management.ObjectName! See the ClassNotFoundException below.
Lloyd
INFO: invoke: getChildren, result =
[Ljavax.management.ObjectName;@64015331
Apr 20, 2009 6:11:21 PM
INFO: invoke: getChildren, return result =
[Ljavax.management.ObjectName;@64015331
Apr 20, 2009 6:11:21 PM
SEVERE: java.lang.reflect.InvocationTargetException
Apr 20, 2009 6:11:21 PM
SEVERE: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Apr 20, 2009 6:11:21 PM
SEVERE: at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
Apr 20, 2009 6:11:21 PM
SEVERE: at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.lang.reflect.Method.invoke(Method.java:597)
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.glassfish
.admin
.amx.impl.mbean.AMXImplBase.getAttributeByMethod(AMXImplBase.java:588)
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.glassfish
.admin
.amx.impl.mbean.AMXImplBase.getAttributeInternal(AMXImplBase.java:505)
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.glassfish
.admin.amx.impl.mbean.AMXImplBase.getAttribute(AMXImplBase.java:460)
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.glassfish
.admin.amx.impl.mbean.AMXImplBase.getAttributes(AMXImplBase.java:544)
Apr 20, 2009 6:11:21 PM
SEVERE: at
com
.sun
.jmx
.interceptor
.DefaultMBeanServerInterceptor
.getAttributes(DefaultMBeanServerInterceptor.java:726)
Apr 20, 2009 6:11:21 PM
SEVERE: at
com
.sun.jmx.mbeanserver.JmxMBeanServer.getAttributes(JmxMBeanServer.java:
665)
Apr 20, 2009 6:11:21 PM
SEVERE: at
javax
.management
.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1407)
Apr 20, 2009 6:11:21 PM
SEVERE: at javax.management.remote.rmi.RMIConnectionImpl.access
$200(RMIConnectionImpl.java:72)
Apr 20, 2009 6:11:21 PM
SEVERE: at javax.management.remote.rmi.RMIConnectionImpl
$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
Apr 20, 2009 6:11:21 PM
SEVERE: at
javax
.management
.remote
.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:
1359)
Apr 20, 2009 6:11:21 PM
SEVERE: at
javax
.management
.remote.rmi.RMIConnectionImpl.getAttributes(RMIConnectionImpl.java:636)
Apr 20, 2009 6:11:21 PM
SEVERE: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Apr 20, 2009 6:11:21 PM
SEVERE: at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
Apr 20, 2009 6:11:21 PM
SEVERE: at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.lang.reflect.Method.invoke(Method.java:597)
Apr 20, 2009 6:11:21 PM
SEVERE: at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
Apr 20, 2009 6:11:21 PM
SEVERE: at sun.rmi.transport.Transport$1.run(Transport.java:159)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.security.AccessController.doPrivileged(Native Method)
Apr 20, 2009 6:11:21 PM
SEVERE: at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
Apr 20, 2009 6:11:21 PM
SEVERE: at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
Apr 20, 2009 6:11:21 PM
SEVERE: at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run0(TCPTransport.java:790)
Apr 20, 2009 6:11:21 PM
SEVERE: at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run(TCPTransport.java:649)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:885)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:907)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.lang.Thread.run(Thread.java:637)
Apr 20, 2009 6:11:21 PM
SEVERE: Caused by: java.lang.NoClassDefFoundError: [Ljavax/management/
ObjectName;
Apr 20, 2009 6:11:21 PM
SEVERE: at $Proxy74.getChildren(Unknown Source)
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.glassfish
.admin.amx.impl.ext.RuntimeMgrImpl.getProtocol(RuntimeMgrImpl.java:123)
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.glassfish
.admin.amx.impl.ext.RuntimeMgrImpl.getRESTBaseURL(RuntimeMgrImpl.java:
152)
Apr 20, 2009 6:11:21 PM
SEVERE: ... 29 more
Apr 20, 2009 6:11:21 PM
SEVERE: Caused by: java.lang.ClassNotFoundException:
javax.management.ObjectName
Apr 20, 2009 6:11:21 PM
SEVERE: at
org
.apache
.felix
.framework
.searchpolicy
.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:565)
Apr 20, 2009 6:11:21 PM
SEVERE: at org.apache.felix.framework.searchpolicy.ModuleImpl.access
$100(ModuleImpl.java:59)
Apr 20, 2009 6:11:21 PM
SEVERE: at org.apache.felix.framework.searchpolicy.ModuleImpl
$ModuleClassLoader.loadClass(ModuleImpl.java:1434)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Apr 20, 2009 6:11:21 PM
SEVERE: at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
374)
Apr 20, 2009 6:11:21 PM
SEVERE: ... 32 more