classloader issues using jax-ws in a client plugin

Bala Nair bnairtm at comcast.net
Sat Sep 25 10:25:24 UTC 2010


  Ok, so I read this section and the JON 2.4 plugin writing guide on 
ClassLoaderFacet and I still have a couple of questions:

- the resource classloader for a managed resource is used by the 
resource component (correct?), but additional classpaths for it are 
defined in the resource discovery component when it implements 
ClassLoaderFacet - do I understand this correctly?

- The class not found exception that we're seeing is for a class defined 
in the java runtime itself.  How is this not available without adding 
rt.jar to the classpath?

Bala Nair

On 9/23/10 9:15 AM, John Mazzitelli wrote:
> I recommend reading the docs on plugin classloading, here:
>
> http://rhq-project.org/display/RHQ/AMPS-Plugin+Extensions#AMPS-PluginExtensions-ClassloaderIssues%2FClassSharingBetweenPlugins
>
> If, after reading that, you still can't get it to work and don't know
> why, let us know.
>
> On 09/22/2010 10:40 PM, Bala Nair wrote:
>>     We are having issues in our plugin metric collection when we try to
>> get data from a remote server using a web service interface and the
>> jax-ws api's.  It looks like a class loader issue - the class loader
>> appears not to have visibility into the jar that contains the web
>> service provider implementation, but we're to set the classpath
>> correctly or include the correct jars in the plugin itself.  Any help
>> would be appreciated.
>>
>> Bala Nair
>> Senior Engineer
>> SeaChange International
>>
>> Here is the relevant agent log section:
>>
>> 2010-09-22 15:53:32,616 DEBUG [MeasurementManager.collector-1]
>> (rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler)-
>> Call to
>> [tv.seachange.monitoring.plugins.URM.URMServerComponent.getValues()]
>> with args [[org.rhq.core.domain.measurement.MeasurementReport at 4964784d,
>> [ScheduledMeasurementInfo[res=10862, name=pg_memory_usage,
>> sched=16163]]]] failed.
>> java.util.concurrent.ExecutionException:
>> javax.xml.ws.WebServiceException: Provider
>> com.sun.xml.internal.ws.spi.ProviderImpl not found
>>            at
>> java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
>>            at java.util.concurrent.FutureTask.get(FutureTask.java:91)
>>            at
>> org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invokeInNewThreadWithLock(ResourceContainer.java:446)
>>            at
>> org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invoke(ResourceContainer.java:434)
>>            at $Proxy73.getValues(Unknown Source)
>>            at
>> org.rhq.core.pc.measurement.MeasurementCollectorRunner.getValues(MeasurementCollectorRunner.java:111)
>>            at
>> org.rhq.core.pc.measurement.MeasurementCollectorRunner.call(MeasurementCollectorRunner.java:91)
>>            at
>> org.rhq.core.pc.measurement.MeasurementManager$MeasurementCollectionRequester.run(MeasurementManager.java:169)
>>            at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>>            at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>>            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>>            at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
>>            at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
>>            at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>            at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>            at java.lang.Thread.run(Thread.java:619)
>> Caused by: javax.xml.ws.WebServiceException: Provider
>> com.sun.xml.internal.ws.spi.ProviderImpl not found
>>            at
>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>            at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>            at javax.xml.ws.spi.Provider.provider(Provider.java:108)
>>            at javax.xml.ws.Service.<init>(Service.java:57)
>>            at
>> com.netsocket.ws.mgmt.ct.basic.WsAgentService.<init>(WsAgentService.java:50)
>>            at com.schange.urm.WsdmApi.setup(WsdmApi.java:62)
>>            at com.schange.urm.WsdmApi.<init>(WsdmApi.java:29)
>>            at
>> tv.seachange.monitoring.plugins.URM.URMServerComponent.getValues(URMServerComponent.java:53)
>>            at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
>>            at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>            at java.lang.reflect.Method.invoke(Method.java:597)
>>            at
>> org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
>>            at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>>            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>>            ... 3 more
>> Caused by: java.lang.ClassNotFoundException:
>> com.sun.xml.internal.ws.spi.ProviderImpl
>>            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>            at java.security.AccessController.doPrivileged(Native Method)
>>            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>            at
>> org.rhq.core.pc.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:63)
>>            at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>            at
>> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:149)
>>            at
>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)
>>            ... 16 more
>>
>> _______________________________________________
>> rhq-devel mailing list
>> rhq-devel at lists.fedorahosted.org
>> https://fedorahosted.org/mailman/listinfo/rhq-devel
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>


More information about the rhq-devel mailing list