Richard,
This is very confusing. You're saying that javax.* packages that are
part of the JDK must be imported as a dependency in pom.xml? How
would I even do that, there is no artifact to import is there?
How could javax.management.ObjectName be used throughout the module
and prior without incident then, numerous times?
Lloyd
On Apr 21, 2009, at 7:23 AM, Richard S. Hall wrote:
> Lloyd,
>
> A bundle is only given implicit access to classes in java.*
> packages. All other packages must be imported. This includes javax.*
> packages. The reason is because javax packages are extensions. It is
> possible for them not to be there or for bundles to container newer
> versions. This would not be the case for java.* packages, which must
> be loaded by the boot class loader.
>
> -> richard
>
> On 4/21/09 10:15 AM, Lloyd Chambers wrote:
>>
>> Richard,
>>
>> javax.management.ObjectName is part of the JDK. I've never had to
>> import the JDK. Could I be misinterpreting the error?
>>
>> The class javax.management.ObjectName has been used extensively
>> prior to that error, of course immediately prior since I just made
>> the list.
>>
>> Lloyd
>>
>> On Apr 21, 2009, at 12:52 AM, Richard S. Hall wrote:
>>
>>> And you are sure your bundle has imported that package?
>>>
>>> -> richard
>>>
>>> On 4/20/09 9:15 PM, Lloyd Chambers wrote:
>>>> 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
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> Lloyd Chambers
>> lloyd.chambers_at_sun.com
>> GlassFish Team
>>
>>
>>
Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team