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