I mean that, looking at your stack trace, the classloader which loaded
the TransferableResourceImpl class does not how about the Transfer class.
If the plugin classloader was the only one involved, he would have found
both of the classes (which are in the client and core JARS I guess). So
I'd say, somehow, another classloader is involved.
Le 12/11/2014 15:38, Ken Louie a écrit :
What do you mean it by, "creates its own, not parent first class
loader"?
The jar is readable, since I'm able to use it just fine in other applications. For
some reason it seems like the classloader of the RHQ plugin doesn't want to load
classes in the wiseman-core jar. I know the wiseman-core jar relies on SOAP web services,
and JAX-WS, and contains schemas, etc. This is the only obvious difference between this
jar and the other jars I use in the plugin. I wonder, could this be causing issues?
Thanks. Appreciate the help.
________________________________________
From: rhq-devel-bounces(a)lists.fedorahosted.org
<rhq-devel-bounces(a)lists.fedorahosted.org> on behalf of Thomas Segismont
<tsegismo(a)redhat.com>
Sent: Wednesday, November 12, 2014 4:08 AM
To: rhq-devel(a)lists.fedorahosted.org
Subject: Re: RHQ plugin can't find class in included jar
The lib directory is the right place to put it.
If your JAR is readable (not corrupted) then maybe wiseman creates its
own, not parent first class loader?
Le 12/11/2014 05:56, Ken Louie a écrit :
> Hi,
>
> I recently updated one of our RHQ plugins to include an implementation
> of ws-management. I added the following jars to the lib/ folder within
> the plugin jar:
>
> wiseman-core.jar
> wiseman-client.jar
>
> We have a ResourceComponent which uses an API, which in-turn uses
> ws-management to make configuration changes to one of our other servers.
> However, when we call this API in our ResourceComponent , and it tries
> to use ws-management, I'm getting the following error:
>
> java.lang.reflect.UndeclaredThrowableException
> at com.sun.proxy.$Proxy70.updateResourceConfiguration(Unknown Source)
> at
>
org.rhq.core.pc.configuration.LegacyConfigManagement.executeUpdate(LegacyConfigManagement.java:87)
> at
>
org.rhq.core.pc.configuration.UpdateResourceConfigurationRunner.call(UpdateResourceConfigurationRunner.java:121)
> at
>
org.rhq.core.pc.configuration.UpdateResourceConfigurationRunner.run(UpdateResourceConfigurationRunner.java:109)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
>
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> at
>
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.Exception: java.lang.NoClassDefFoundError: Could
> not initialize class com.sun.ws.management.transfer.Transfer
> at
>
org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:639)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> ... 3 more
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> com.sun.ws.management.transfer.Transfer
> at
>
com.sun.ws.management.client.impl.TransferableResourceImpl.setTransferProperties(TransferableResourceImpl.java:451)
> at
>
com.sun.ws.management.client.impl.TransferableResourceImpl.get(TransferableResourceImpl.java:531)
> at
>
com.sun.ws.management.client.impl.TransferableResourceImpl.get(TransferableResourceImpl.java:516)
> at
>
com.sun.ws.management.client.impl.TransferableResourceImpl.get(TransferableResourceImpl.java:504)
>
>
> I'm not sure why this is happening. The class:
> com.sun.ws.management.transfer.Transfer exists in wiseman-core.jar,
> which is included in the lib/ directory within the plug-in jar. I'm
> pretty sure this is the right location to put the jars, since I have
> other jars in this lib/ folder, and the plug-in seems to use them just
> fine (i.e. it seems to be able to use wiseman-client.jar) .
>
> Does anyone know why this issue would be happening, and how I could
> resolve it? Appreciate the help
>
> Thanks
>
>
>
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel