ServiceBusContract class throws Exception on Storm cluster
On a Storm cluster if we are trying to access Azure Service bus, it fails with below exception.
Service or property not registered: com.microsoft.windowsazure.services.servicebus.ServiceBusContract class com.sun.jersey.api.client.Client
This does not happen on our local Storm installation.
We had a similar issue in storm cluster when we are creating a shaded jar which includes below jar files with a bunch of other jars:
microsoft-azure-api-core-0.5.0.jar microsoft-azure-api-servicebus-0.5.0.jar
There is a services resource file with same name "/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports" in both the jar files
When the shaded jar is created, services entries from microsoft-azure-api-core-0.5.0.jar are overwritten with the service entries from microsoft-azure-api-servicebus-0.5.0.jar as the resource file name is same.
To fix this we used ServicesResourceTransformer class in maven-shade-plugin to merge the resource file from both the jars instead of overwriting as per below link:
http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer
thanks, above workaround solves the issue
hi arbarik, we are also facing the same issue.. After using shading, when we try to deploy the jar, we are getting "Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig" Could you please tell us how did u resolve this issue??