I am using HttpClient components from Apache for the following simple program and I see the below exception:
Exception in thread \"main\" java.lang.NoSuchFieldErr
I had this problem. It looks like there is a problem while initializing HttpClient with HttpClientBuilder.create().build(). If you want more immediate solution just use new DefaultHttpClient() to initialize HttpClient.
HttpClient client = new DefaultHttpClient();