I have to program a client of an Azure Service Bus broker, in Java. The problem that arises is that it gives me this error when starting the application:
java.lang.ClassNotFoundException: org.apache.http.impl.client.HttpClientBuilder
and I have no idea why. And the line of code that gives error is:
> Configuration config = ServiceBusConfiguration.configureWithSASAuthentication(Endpoint,SharedAccessKeyName,SharedAccessKey,".servicebus.windows.net");
> service = ServiceBusService.create(config);
To develop it I am starting from the Microsoft example that can be found here: https://github.com/Microsoft/azure-chat-for-java
I have taken all the azure libraries that come in the POM.xml (all those under the phrase "Azure Java SDK libraries"): https://github.com/Microsoft/azure-chat-for-java/blob/ master/azchat-web/pom.xml
Does anyone have any idea what might be going on? Microsoft's documentation on Azure Service Bus for Java leaves a lot to be desired :(
Could it be a version problem?
Given the error, you are missing the apache library that contains that class. Adding this to the POM should work:
I hope it works for you, greetings!