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 talldean <ta...@gmail.com> on 2008/08/21 17:23:19 UTC
Problems calling new PostMethod(url)
I have the following block of code, using a freshly downloaded
HttpClient-3.1, and cannot figure out what I've done wrong.
try {
String urlString = "http://www.google.com";
logger.trace("1");
PostMethod method = new PostMethod(urlString);
logger.trace("2");
} catch (Exception e) {
logger.trace("3");
}
The logs get the message "1", and the program terminates before it seems to
get to the trace 2 line, without throwing an exception of any sort. Any
ideas? Same thing seems to happen with both PostMethod and GetMethod, and
I'm out of ideas.
--
View this message in context: http://www.nabble.com/Problems-calling-new-PostMethod%28url%29-tp19091079p19091079.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: Problems calling new PostMethod(url)
Posted by talldean <ta...@gmail.com>.
The main log wasn't showing it, in this case, but a second log popped up a
noclassdef error; that, I can fix.
-D
talldean wrote:
>
> I have the following block of code, using a freshly downloaded
> HttpClient-3.1, and cannot figure out what I've done wrong.
>
> try {
> String urlString = "http://www.google.com";
> logger.trace("1");
> PostMethod method = new PostMethod(urlString);
> logger.trace("2");
> } catch (Exception e) {
> logger.trace("3");
> }
>
> The logs get the message "1", and the program terminates before it seems
> to get to the trace 2 line, without throwing an exception of any sort.
> Any ideas? Same thing seems to happen with both PostMethod and GetMethod,
> and I'm out of ideas.
>
>
--
View this message in context: http://www.nabble.com/Problems-calling-new-PostMethod%28url%29-tp19091079p19092671.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
RE: Problems calling new PostMethod(url)
Posted by Na...@emc.com.
There may be a runtime exception... Try catching Throwable instead of
catching Exception. I hope, this might give more info about the failure.
-----Original Message-----
From: talldean [mailto:talldean@gmail.com]
Sent: Thursday, August 21, 2008 8:23 AM
To: httpclient-users@hc.apache.org
Subject: Problems calling new PostMethod(url)
I have the following block of code, using a freshly downloaded
HttpClient-3.1, and cannot figure out what I've done wrong.
try {
String urlString = "http://www.google.com";
logger.trace("1");
PostMethod method = new PostMethod(urlString);
logger.trace("2");
} catch (Exception e) {
logger.trace("3");
}
The logs get the message "1", and the program terminates before it seems
to
get to the trace 2 line, without throwing an exception of any sort. Any
ideas? Same thing seems to happen with both PostMethod and GetMethod,
and
I'm out of ideas.
--
View this message in context:
http://www.nabble.com/Problems-calling-new-PostMethod%28url%29-tp1909107
9p19091079.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org