Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 79709 invoked from network); 20 Aug 2009 10:11:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Aug 2009 10:11:15 -0000 Received: (qmail 22856 invoked by uid 500); 20 Aug 2009 10:11:34 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 22818 invoked by uid 500); 20 Aug 2009 10:11:33 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 22808 invoked by uid 99); 20 Aug 2009 10:11:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 10:11:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aljesco@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 10:11:23 +0000 Received: by fg-out-1718.google.com with SMTP id 13so1135042fge.9 for ; Thu, 20 Aug 2009 03:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=a2urNE/AhGXu/qna0MvHS7o70Qf8s2e250YDum8zK44=; b=aqh6Qz3NVmNIUhxIyQ3Qmz8bsyi8a19DJt4zFkBLRO0ONJLYyESJ7Mj90nNw28jEp8 YIU7aOBHY7CvZMPLr9ceuOUoxIhOTXED5SAA1dAtEcucHdKadmLlUxSW/CtZp7ibCjUj Us/rTHe9qt38KJA5o3yKECGgLLiKFiFgiEo5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=JVOBkvw4aQjMuOWfsStCcs6Gfx1ANU4EF6iQfEtYxjS9GSt9waFyRngaCOmhVuNhML zWNP6FWkj8maaOAVol2oNr2hOV8gI2AAf7cnVDCrDJObUiDfZ912KrdvU8QYATqCLvmi tOtm6kWCtNRwHTlX24vzz9CJbvtQzznf5gRfE= MIME-Version: 1.0 Received: by 10.86.41.19 with SMTP id o19mr4962242fgo.45.1250763061816; Thu, 20 Aug 2009 03:11:01 -0700 (PDT) In-Reply-To: <25aac9fc0908190430r74df2688xa109af00d0dc3cd0@mail.gmail.com> References: <4A8AEC82.7090003@gmail.com> <20090819090738.GA18365@ok2cons2.nine.ch> <7230526a0908190300g7650f98dp31a91f5eaae9acd9@mail.gmail.com> <20090819100246.GA25628@ok2cons2.nine.ch> <7230526a0908190305w27cce30auf75c5ddecdca3262@mail.gmail.com> <20090819101233.GA1156@ok2cons2.nine.ch> <25aac9fc0908190430r74df2688xa109af00d0dc3cd0@mail.gmail.com> Date: Thu, 20 Aug 2009 13:10:58 +0300 Message-ID: <7230526a0908200310g7b98f4dxa1287a52d02323b7@mail.gmail.com> Subject: Re: HttpClient From: Al Jesco To: HttpClient User Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Problem's so stupid.. It's solved now. Firewall was turned off when I launched program. Firewall didn't have network rules for Eclipse & JRE. So JavaVM couldn't open socket... Thanks all for help! 2009/8/19 sebb : > On 19/08/2009, Oleg Kalnichevski wrote: >> On Wed, Aug 19, 2009 at 01:05:51PM +0300, Al Jesco wrote: >> =A0> 2009/8/19 Oleg Kalnichevski : >> =A0> > On Wed, Aug 19, 2009 at 01:00:23PM +0300, Al Jesco wrote: >> =A0> >> 2009/8/19 Oleg Kalnichevski : >> =A0> >> > On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote: >> =A0> >> >> Hello all! >> =A0> >> >> I'm using HttpClient 4.0 and got some error. >> =A0> >> >> There's code I tested >> =A0> >> >> >> =A0> >> >> ***** >> =A0> >> >> ? ? ?DefaultHttpClient httpclient =3D new DefaultHttpClient()= ; >> =A0> >> >> ? ? ?HttpGet httpget =3D new HttpGet("http://yandex.ru"); >> =A0> >> >> ? ? ?HttpResponse response =3D httpclient.execute(httpget); >> =A0> >> >> ? ? ?HttpEntity entity =3D response.getEntity(); >> =A0> >> >> ? ? ?System.out.println("Login form get: " + response.getStat= usLine()); >> =A0> >> >> ? ? ?if (entity !=3D null) { >> =A0> >> >> ? ? ? ? ?entity.consumeContent(); >> =A0> >> >> ? ? ?} >> =A0> >> >> ? ? ?System.out.println("Initial set of cookies:"); >> =A0> >> >> ? ? ?List cookies =3D httpclient.getCookieStore(). >> =A0> >> >> getCookies(); >> =A0> >> >> ? ? ?if (cookies.isEmpty()) { >> =A0> >> >> ? ? ? ? ?System.out.println("None"); >> =A0> >> >> ? ? ?} else { >> =A0> >> >> ? ? ? ? ?for (int i =3D 0; i < cookies.size(); i++) { >> =A0> >> >> ? ? ? ? ? ? ?System.out.println("- " + cookies.get(i).toStrin= g()); >> =A0> >> >> ? ? ? ? ?} >> =A0> >> >> ? ? ?} >> =A0> >> >> ? ? ?httpclient.getConnectionManager().shutdown(); >> =A0> >> >> ***** >> =A0> >> >> >> =A0> >> >> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and >> =A0> >> >> httpclient.execute(httpget) works successfully. >> =A0> >> >> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurrie= d. >> =A0> >> >> >> =A0> >> >> >> =A0> >> > >> =A0> >> > 'Software caused connection abort: socket write error' usually= means the >> =A0> >> > connection has been terminated abnormally either by the target= server, or by an >> =A0> >> > intermediate proxy or due to some other kind of connectivity i= ssue. >> =A0> >> > >> =A0> >> > This problem has nothing to do with Httpclient and is likely t= o be a problem >> =A0> >> > with your local setup. >> =A0> >> > >> =A0> >> > Oleg >> =A0> >> > >> =A0> >> > >> =A0> >> > >> =A0> >> >> ***** >> =A0> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequest= Director >> =A0> >> >> execute >> =A0> >> >> INFO: I/O exception (java.net.SocketException) caught when pr= ocessing >> =A0> >> >> request: Software caused connection abort: socket write error >> =A0> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequest= Director >> =A0> >> >> execute >> =A0> >> >> INFO: Retrying request >> =A0> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequest= Director >> =A0> >> >> execute >> =A0> >> >> INFO: I/O exception (java.net.SocketException) caught when pr= ocessing >> =A0> >> >> request: Software caused connection abort: socket write error >> =A0> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequest= Director >> =A0> >> >> execute >> =A0> >> >> INFO: Retrying request >> =A0> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequest= Director >> =A0> >> >> execute >> =A0> >> >> INFO: I/O exception (java.net.SocketException) caught when pr= ocessing >> =A0> >> >> request: Software caused connection abort: socket write error >> =A0> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequest= Director >> =A0> >> >> execute >> =A0> >> >> INFO: Retrying request >> =A0> >> >> Exception in thread "main" java.net.SocketException: Software= caused >> =A0> >> >> connection abort: socket write error >> =A0> >> >> ?at java.net.SocketOutputStream.socketWrite0(Native Method) >> =A0> >> >> ?at java.net.SocketOutputStream.socketWrite(Unknown Source) >> =A0> >> >> ?at java.net.SocketOutputStream.write(Unknown Source) >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuff= er(AbstractSessionOutputBuffer.java:106) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(Abs= tractSessionOutputBuffer.java:113) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.AbstractHttpClientConnection.doFlush(Abs= tractHttpClientConnection.java:260) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.SocketHttpClientConnection.close(SocketH= ttpClientConnection.java:248) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.conn.DefaultClientConnection.close(Defau= ltClientConnection.java:154) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(Abs= tractPooledConnAdapter.java:131) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequ= estExecutor.java:130) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.client.DefaultRequestDirector.execute(De= faultRequestDirector.java:447) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.client.AbstractHttpClient.execute(Abstra= ctHttpClient.java:641) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.client.AbstractHttpClient.execute(Abstra= ctHttpClient.java:576) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at >> =A0> >> >> org.apache.http.impl.client.AbstractHttpClient.execute(Abstra= ctHttpClient.java:554) >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> ?at Main.main(Main.java:52) >> =A0> >> >> ***** >> =A0> >> >> >> =A0> >> >> This error also occurring when I'm trying to launch program u= sing >> =A0> >> >> system JRE (windows xp sp2, JRE 1.6.0_16). >> =A0> >> >> >> =A0> >> >> Can anyone help me..? >> =A0> >> >> >> =A0> >> >> >> =A0> >> >> -------------------------------------------------------------= -------- >> =A0> >> >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apach= e.org >> =A0> >> >> For additional commands, e-mail: httpclient-users-help@hc.apa= che.org >> =A0> >> >> >> =A0> >> > >> =A0> >> > --------------------------------------------------------------= ------- >> =A0> >> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache= .org >> =A0> >> > For additional commands, e-mail: httpclient-users-help@hc.apac= he.org >> =A0> >> > >> =A0> >> > >> =A0> >> >> =A0> >> Thanks for reply, Oleg. >> =A0> >> So.. Why is it working fine in netbeans..? >> =A0> >> >> =A0> > >> =A0> > Because Eclipse and Netbeans are two completely different things.= Check your >> =A0> > local setup. >> =A0> > >> =A0> > Oleg >> =A0> > >> =A0> > >> =A0> >> ----------------------------------------------------------------= ----- >> =A0> >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.o= rg >> =A0> >> For additional commands, e-mail: httpclient-users-help@hc.apache= .org >> =A0> >> >> =A0> > >> =A0> > -----------------------------------------------------------------= ---- >> =A0> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.or= g >> =A0> > For additional commands, e-mail: httpclient-users-help@hc.apache.= org >> =A0> > >> =A0> > >> =A0> >> =A0> What do you mean for "local setup"? >> =A0> >> >> >> Eclipse configuration, such as proxy settings, TCP/IP settings, firewall= settings, if you are using one, anything that has to do with connectivity. >> >> =A0You may also want to try running your app as a standalone process in = order to see if the problem is related to your Eclipse setup. >> > > I've just noticed that you are using two different versions of Java > 1.6 - 1.6.0_14 and 1.6.0_16 - which suggests that you are using two > different hosts. > > If so, then different host setup or network connectivity is the most > likely cause. > >> =A0Oleg >> >> >> =A0> -------------------------------------------------------------------= -- >> =A0> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >> =A0> For additional commands, e-mail: httpclient-users-help@hc.apache.or= g >> =A0> >> >> =A0--------------------------------------------------------------------- >> =A0To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >> =A0For 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org