You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Andrey Kolyadenko <ak...@gmail.com> on 2008/05/06 18:06:28 UTC
java.lang.IllegalArgumentException: host parameter is null
Hi,
I am trying to start TrivialApp application in following way: java
TrivialApp yahoo.com, and have strange error all time:
Exception in thread "main" java.lang.IllegalArgumentException: host
parameter is null
at
org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:206)
at
org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:155)
at
org.apache.commons.httpclient.SimpleHttpConnectionManager.getConnectionWithTimeout(SimpleHttpConnectionManager.java:175)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
Could you please explain me what the problem?
Thank you.
Re: java.lang.IllegalArgumentException: host parameter is null
Posted by Andrey Kolyadenko <ak...@gmail.com>.
Found the problem. I need to use http://yahoo.com instead of yahoo.com.
Thanks all!
On Tue, May 6, 2008 at 11:06 AM, Andrey Kolyadenko <ak...@gmail.com>
wrote:
> Hi,
>
> I am trying to start TrivialApp application in following way: java
> TrivialApp yahoo.com, and have strange error all time:
>
> Exception in thread "main" java.lang.IllegalArgumentException: host
> parameter is null
> at
> org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:206)
> at
> org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:155)
> at
> org.apache.commons.httpclient.SimpleHttpConnectionManager.getConnectionWithTimeout(SimpleHttpConnectionManager.java:175)
> at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
> at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>
> Could you please explain me what the problem?
>
> Thank you.
>