1

There are too many posts on this issue. I have tried almost everything and it works beautifully when I am running it on spark local.

But if I pass the url from config as a param and running on spark client, than its failing with the error

"java.lang.IllegalArgumentException: host parameter is null"

Here is what I am doing

HttpClient client = new HttpClient();
client.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
        client.getHttpConnectionManager().getParams().setSoTimeout(5000);
 PostMethod method = new PostMethod("https://myurl/dir/dirb"); 
client.executeMethod(method);

What else i am missing to make it work ?

5
  • This issue comes when there is incomplete Url, Please print value param when you pass the URL from config as a param. may you miss something? Commented Sep 12, 2019 at 10:09
  • Possible duplicate of HttpClient exception: java.lang.IllegalArgumentException: host parameter is null Commented Sep 12, 2019 at 10:18
  • 1
    @grog i already did whatever has been discussed in the other post. the issue still exists. Commented Sep 12, 2019 at 12:06
  • 1
    @AmitRai print is showing the complete url with https Commented Sep 12, 2019 at 12:06
  • After I used Broadcast , the issue got resolved. Commented Sep 20, 2019 at 4:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.