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 aljesco <al...@gmail.com> on 2009/08/18 20:01:38 UTC

HttpClient

Hello all!
I'm using HttpClient 4.0 and got some error.
There's code I tested

*****
      DefaultHttpClient httpclient = new DefaultHttpClient();
      HttpGet httpget = new HttpGet("http://yandex.ru");
      HttpResponse response = httpclient.execute(httpget);
      HttpEntity entity = response.getEntity();
      System.out.println("Login form get: " + response.getStatusLine());
      if (entity != null) {
          entity.consumeContent();
      }
      System.out.println("Initial set of cookies:");
      List<Cookie> cookies = httpclient.getCookieStore().
getCookies();
      if (cookies.isEmpty()) {
          System.out.println("None");
      } else {
          for (int i = 0; i < cookies.size(); i++) {
              System.out.println("- " + cookies.get(i).toString());
          }
      }
      httpclient.getConnectionManager().shutdown();
*****

It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
httpclient.execute(httpget) works successfully.
In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.


*****
18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector 
execute
INFO: I/O exception (java.net.SocketException) caught when processing
request: Software caused connection abort: socket write error
18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector 
execute
INFO: Retrying request
18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector 
execute
INFO: I/O exception (java.net.SocketException) caught when processing
request: Software caused connection abort: socket write error
18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector 
execute
INFO: Retrying request
18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector 
execute
INFO: I/O exception (java.net.SocketException) caught when processing
request: Software caused connection abort: socket write error
18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector 
execute
INFO: Retrying request
Exception in thread "main" java.net.SocketException: Software caused
connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at 
org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106) 

  at 
org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113) 

  at 
org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260) 

  at 
org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248) 

  at 
org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154) 

  at 
org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131) 

  at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130) 

  at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447) 

  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) 

  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) 

  at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) 

  at Main.main(Main.java:52)
*****

This error also occurring when I'm trying to launch program using
system JRE (windows xp sp2, JRE 1.6.0_16).

Can anyone help me..?


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: HttpClient

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, Sep 01, 2009 at 04:59:33PM +0200, Villemos, Gert wrote:
> We are using solrj, which uses the HTTPclient 3.1 (with slf4j) in a
> client also using Aperture (with log4j 1.2.14). When executing a query I
> get the error shown below. The request is never received by the server,
> i.e. the exception is thrown before the request is issued. I think I'm
> running into a compatibility issue between slf4j and log4j, but don't
> know how to solve it...
> 
>  
> 
> Regards,
> 
> Gert.
> 
> 

Gert,

This problem has nothing to do with HttpClient. You may have a better luck
asking this question at the slf4j list.

Oleg

 
> 
>  
> 
> --- Stack Trace ------------------------
> 
>  
> 
> org.apache.solr.client.solrj.SolrServerException: Error executing query
> 
>       at
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
> ava:96)
> 
>       at
> org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)
> 
>       at
> org.esa.huginn.solr.SolrContainer.getNext(SolrContainer.java:105)
> 
>       at
> org.esa.huginn.commons.container.consolidationstrategies.SynonymReplacem
> entConsolidator.execute(SynonymReplacementConsolidator.java:191)
> 
>       at
> org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.initialize(Fil
> eSystemCrawlerContext.java:134)
> 
>       at
> org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.main(FileSyste
> mCrawlerContext.java:63)
> 
> Caused by: java.lang.IllegalStateException: Level number 10 is not
> recognized.
> 
>       at
> org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:421)
> 
>       at
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocatio
> nAwareLog.java:106)
> 
>       at
> org.apache.commons.httpclient.HttpConnection.releaseConnection(HttpConne
> ction.java:1178)
> 
>       at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
> nectionAdapter.releaseConnection(MultiThreadedHttpConnectionManager.java
> :1423)
> 
>       at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
> dDirector.java:222)
> 
>       at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
> 97)
> 
>       at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
> 23)
> 
>       at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
> ttpSolrServer.java:335)
> 
>       at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
> ttpSolrServer.java:183)
> 
>       at
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
> ava:90)
> 
> 
> 
> Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch?tzen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
> 
> 
> 
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


RE: HttpClient

Posted by "Villemos, Gert" <ge...@logica.com>.
We are using solrj, which uses the HTTPclient 3.1 (with slf4j) in a
client also using Aperture (with log4j 1.2.14). When executing a query I
get the error shown below. The request is never received by the server,
i.e. the exception is thrown before the request is issued. I think I'm
running into a compatibility issue between slf4j and log4j, but don't
know how to solve it...

 

Regards,

Gert.

 

 

--- Stack Trace ------------------------

 

org.apache.solr.client.solrj.SolrServerException: Error executing query

      at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
ava:96)

      at
org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)

      at
org.esa.huginn.solr.SolrContainer.getNext(SolrContainer.java:105)

      at
org.esa.huginn.commons.container.consolidationstrategies.SynonymReplacem
entConsolidator.execute(SynonymReplacementConsolidator.java:191)

      at
org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.initialize(Fil
eSystemCrawlerContext.java:134)

      at
org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.main(FileSyste
mCrawlerContext.java:63)

Caused by: java.lang.IllegalStateException: Level number 10 is not
recognized.

      at
org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:421)

      at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocatio
nAwareLog.java:106)

      at
org.apache.commons.httpclient.HttpConnection.releaseConnection(HttpConne
ction.java:1178)

      at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
nectionAdapter.releaseConnection(MultiThreadedHttpConnectionManager.java
:1423)

      at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:222)

      at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
97)

      at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
23)

      at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
ttpSolrServer.java:335)

      at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
ttpSolrServer.java:183)

      at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
ava:90)



Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch�tzen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


Re: HttpClient

Posted by Al Jesco <al...@gmail.com>.
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 <se...@gmail.com>:
> On 19/08/2009, Oleg Kalnichevski <ol...@apache.org> wrote:
>> On Wed, Aug 19, 2009 at 01:05:51PM +0300, Al Jesco wrote:
>>  > 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
>>  > > On Wed, Aug 19, 2009 at 01:00:23PM +0300, Al Jesco wrote:
>>  > >> 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
>>  > >> > On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
>>  > >> >> Hello all!
>>  > >> >> I'm using HttpClient 4.0 and got some error.
>>  > >> >> There's code I tested
>>  > >> >>
>>  > >> >> *****
>>  > >> >> ? ? ?DefaultHttpClient httpclient = new DefaultHttpClient();
>>  > >> >> ? ? ?HttpGet httpget = new HttpGet("http://yandex.ru");
>>  > >> >> ? ? ?HttpResponse response = httpclient.execute(httpget);
>>  > >> >> ? ? ?HttpEntity entity = response.getEntity();
>>  > >> >> ? ? ?System.out.println("Login form get: " + response.getStatusLine());
>>  > >> >> ? ? ?if (entity != null) {
>>  > >> >> ? ? ? ? ?entity.consumeContent();
>>  > >> >> ? ? ?}
>>  > >> >> ? ? ?System.out.println("Initial set of cookies:");
>>  > >> >> ? ? ?List<Cookie> cookies = httpclient.getCookieStore().
>>  > >> >> getCookies();
>>  > >> >> ? ? ?if (cookies.isEmpty()) {
>>  > >> >> ? ? ? ? ?System.out.println("None");
>>  > >> >> ? ? ?} else {
>>  > >> >> ? ? ? ? ?for (int i = 0; i < cookies.size(); i++) {
>>  > >> >> ? ? ? ? ? ? ?System.out.println("- " + cookies.get(i).toString());
>>  > >> >> ? ? ? ? ?}
>>  > >> >> ? ? ?}
>>  > >> >> ? ? ?httpclient.getConnectionManager().shutdown();
>>  > >> >> *****
>>  > >> >>
>>  > >> >> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
>>  > >> >> httpclient.execute(httpget) works successfully.
>>  > >> >> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
>>  > >> >>
>>  > >> >>
>>  > >> >
>>  > >> > 'Software caused connection abort: socket write error' usually means the
>>  > >> > connection has been terminated abnormally either by the target server, or by an
>>  > >> > intermediate proxy or due to some other kind of connectivity issue.
>>  > >> >
>>  > >> > This problem has nothing to do with Httpclient and is likely to be a problem
>>  > >> > with your local setup.
>>  > >> >
>>  > >> > Oleg
>>  > >> >
>>  > >> >
>>  > >> >
>>  > >> >> *****
>>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>>  > >> >> execute
>>  > >> >> INFO: I/O exception (java.net.SocketException) caught when processing
>>  > >> >> request: Software caused connection abort: socket write error
>>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>>  > >> >> execute
>>  > >> >> INFO: Retrying request
>>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>>  > >> >> execute
>>  > >> >> INFO: I/O exception (java.net.SocketException) caught when processing
>>  > >> >> request: Software caused connection abort: socket write error
>>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>>  > >> >> execute
>>  > >> >> INFO: Retrying request
>>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>>  > >> >> execute
>>  > >> >> INFO: I/O exception (java.net.SocketException) caught when processing
>>  > >> >> request: Software caused connection abort: socket write error
>>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>>  > >> >> execute
>>  > >> >> INFO: Retrying request
>>  > >> >> Exception in thread "main" java.net.SocketException: Software caused
>>  > >> >> connection abort: socket write error
>>  > >> >> ?at java.net.SocketOutputStream.socketWrite0(Native Method)
>>  > >> >> ?at java.net.SocketOutputStream.socketWrite(Unknown Source)
>>  > >> >> ?at java.net.SocketOutputStream.write(Unknown Source)
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at
>>  > >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
>>  > >> >>
>>  > >> >>
>>  > >> >> ?at Main.main(Main.java:52)
>>  > >> >> *****
>>  > >> >>
>>  > >> >> This error also occurring when I'm trying to launch program using
>>  > >> >> system JRE (windows xp sp2, JRE 1.6.0_16).
>>  > >> >>
>>  > >> >> Can anyone help me..?
>>  > >> >>
>>  > >> >>
>>  > >> >> ---------------------------------------------------------------------
>>  > >> >> 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
>>  > >> >
>>  > >> >
>>  > >>
>>  > >> Thanks for reply, Oleg.
>>  > >> So.. Why is it working fine in netbeans..?
>>  > >>
>>  > >
>>  > > Because Eclipse and Netbeans are two completely different things. Check your
>>  > > local setup.
>>  > >
>>  > > Oleg
>>  > >
>>  > >
>>  > >> ---------------------------------------------------------------------
>>  > >> 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
>>  > >
>>  > >
>>  >
>>  > What do you mean for "local setup"?
>>  >
>>
>>
>> Eclipse configuration, such as proxy settings, TCP/IP settings, firewall settings, if you are using one, anything that has to do with connectivity.
>>
>>  You 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.
>
>>  Oleg
>>
>>
>>  > ---------------------------------------------------------------------
>>  > 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
>>
>>
>
> ---------------------------------------------------------------------
> 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


Re: HttpClient

Posted by sebb <se...@gmail.com>.
On 19/08/2009, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Wed, Aug 19, 2009 at 01:05:51PM +0300, Al Jesco wrote:
>  > 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
>  > > On Wed, Aug 19, 2009 at 01:00:23PM +0300, Al Jesco wrote:
>  > >> 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
>  > >> > On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
>  > >> >> Hello all!
>  > >> >> I'm using HttpClient 4.0 and got some error.
>  > >> >> There's code I tested
>  > >> >>
>  > >> >> *****
>  > >> >> ? ? ?DefaultHttpClient httpclient = new DefaultHttpClient();
>  > >> >> ? ? ?HttpGet httpget = new HttpGet("http://yandex.ru");
>  > >> >> ? ? ?HttpResponse response = httpclient.execute(httpget);
>  > >> >> ? ? ?HttpEntity entity = response.getEntity();
>  > >> >> ? ? ?System.out.println("Login form get: " + response.getStatusLine());
>  > >> >> ? ? ?if (entity != null) {
>  > >> >> ? ? ? ? ?entity.consumeContent();
>  > >> >> ? ? ?}
>  > >> >> ? ? ?System.out.println("Initial set of cookies:");
>  > >> >> ? ? ?List<Cookie> cookies = httpclient.getCookieStore().
>  > >> >> getCookies();
>  > >> >> ? ? ?if (cookies.isEmpty()) {
>  > >> >> ? ? ? ? ?System.out.println("None");
>  > >> >> ? ? ?} else {
>  > >> >> ? ? ? ? ?for (int i = 0; i < cookies.size(); i++) {
>  > >> >> ? ? ? ? ? ? ?System.out.println("- " + cookies.get(i).toString());
>  > >> >> ? ? ? ? ?}
>  > >> >> ? ? ?}
>  > >> >> ? ? ?httpclient.getConnectionManager().shutdown();
>  > >> >> *****
>  > >> >>
>  > >> >> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
>  > >> >> httpclient.execute(httpget) works successfully.
>  > >> >> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
>  > >> >>
>  > >> >>
>  > >> >
>  > >> > 'Software caused connection abort: socket write error' usually means the
>  > >> > connection has been terminated abnormally either by the target server, or by an
>  > >> > intermediate proxy or due to some other kind of connectivity issue.
>  > >> >
>  > >> > This problem has nothing to do with Httpclient and is likely to be a problem
>  > >> > with your local setup.
>  > >> >
>  > >> > Oleg
>  > >> >
>  > >> >
>  > >> >
>  > >> >> *****
>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>  > >> >> execute
>  > >> >> INFO: I/O exception (java.net.SocketException) caught when processing
>  > >> >> request: Software caused connection abort: socket write error
>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>  > >> >> execute
>  > >> >> INFO: Retrying request
>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>  > >> >> execute
>  > >> >> INFO: I/O exception (java.net.SocketException) caught when processing
>  > >> >> request: Software caused connection abort: socket write error
>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>  > >> >> execute
>  > >> >> INFO: Retrying request
>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>  > >> >> execute
>  > >> >> INFO: I/O exception (java.net.SocketException) caught when processing
>  > >> >> request: Software caused connection abort: socket write error
>  > >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>  > >> >> execute
>  > >> >> INFO: Retrying request
>  > >> >> Exception in thread "main" java.net.SocketException: Software caused
>  > >> >> connection abort: socket write error
>  > >> >> ?at java.net.SocketOutputStream.socketWrite0(Native Method)
>  > >> >> ?at java.net.SocketOutputStream.socketWrite(Unknown Source)
>  > >> >> ?at java.net.SocketOutputStream.write(Unknown Source)
>  > >> >> ?at
>  > >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
>  > >> >>
>  > >> >>
>  > >> >> ?at
>  > >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
>  > >> >>
>  > >> >>
>  > >> >> ?at Main.main(Main.java:52)
>  > >> >> *****
>  > >> >>
>  > >> >> This error also occurring when I'm trying to launch program using
>  > >> >> system JRE (windows xp sp2, JRE 1.6.0_16).
>  > >> >>
>  > >> >> Can anyone help me..?
>  > >> >>
>  > >> >>
>  > >> >> ---------------------------------------------------------------------
>  > >> >> 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
>  > >> >
>  > >> >
>  > >>
>  > >> Thanks for reply, Oleg.
>  > >> So.. Why is it working fine in netbeans..?
>  > >>
>  > >
>  > > Because Eclipse and Netbeans are two completely different things. Check your
>  > > local setup.
>  > >
>  > > Oleg
>  > >
>  > >
>  > >> ---------------------------------------------------------------------
>  > >> 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
>  > >
>  > >
>  >
>  > What do you mean for "local setup"?
>  >
>
>
> Eclipse configuration, such as proxy settings, TCP/IP settings, firewall settings, if you are using one, anything that has to do with connectivity.
>
>  You 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.

>  Oleg
>
>
>  > ---------------------------------------------------------------------
>  > 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: HttpClient

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, Aug 19, 2009 at 01:05:51PM +0300, Al Jesco wrote:
> 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
> > On Wed, Aug 19, 2009 at 01:00:23PM +0300, Al Jesco wrote:
> >> 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
> >> > On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
> >> >> Hello all!
> >> >> I'm using HttpClient 4.0 and got some error.
> >> >> There's code I tested
> >> >>
> >> >> *****
> >> >> ? ? ?DefaultHttpClient httpclient = new DefaultHttpClient();
> >> >> ? ? ?HttpGet httpget = new HttpGet("http://yandex.ru");
> >> >> ? ? ?HttpResponse response = httpclient.execute(httpget);
> >> >> ? ? ?HttpEntity entity = response.getEntity();
> >> >> ? ? ?System.out.println("Login form get: " + response.getStatusLine());
> >> >> ? ? ?if (entity != null) {
> >> >> ? ? ? ? ?entity.consumeContent();
> >> >> ? ? ?}
> >> >> ? ? ?System.out.println("Initial set of cookies:");
> >> >> ? ? ?List<Cookie> cookies = httpclient.getCookieStore().
> >> >> getCookies();
> >> >> ? ? ?if (cookies.isEmpty()) {
> >> >> ? ? ? ? ?System.out.println("None");
> >> >> ? ? ?} else {
> >> >> ? ? ? ? ?for (int i = 0; i < cookies.size(); i++) {
> >> >> ? ? ? ? ? ? ?System.out.println("- " + cookies.get(i).toString());
> >> >> ? ? ? ? ?}
> >> >> ? ? ?}
> >> >> ? ? ?httpclient.getConnectionManager().shutdown();
> >> >> *****
> >> >>
> >> >> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
> >> >> httpclient.execute(httpget) works successfully.
> >> >> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
> >> >>
> >> >>
> >> >
> >> > 'Software caused connection abort: socket write error' usually means the
> >> > connection has been terminated abnormally either by the target server, or by an
> >> > intermediate proxy or due to some other kind of connectivity issue.
> >> >
> >> > This problem has nothing to do with Httpclient and is likely to be a problem
> >> > with your local setup.
> >> >
> >> > Oleg
> >> >
> >> >
> >> >
> >> >> *****
> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> >> execute
> >> >> INFO: I/O exception (java.net.SocketException) caught when processing
> >> >> request: Software caused connection abort: socket write error
> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> >> execute
> >> >> INFO: Retrying request
> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> >> execute
> >> >> INFO: I/O exception (java.net.SocketException) caught when processing
> >> >> request: Software caused connection abort: socket write error
> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> >> execute
> >> >> INFO: Retrying request
> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> >> execute
> >> >> INFO: I/O exception (java.net.SocketException) caught when processing
> >> >> request: Software caused connection abort: socket write error
> >> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> >> execute
> >> >> INFO: Retrying request
> >> >> Exception in thread "main" java.net.SocketException: Software caused
> >> >> connection abort: socket write error
> >> >> ?at java.net.SocketOutputStream.socketWrite0(Native Method)
> >> >> ?at java.net.SocketOutputStream.socketWrite(Unknown Source)
> >> >> ?at java.net.SocketOutputStream.write(Unknown Source)
> >> >> ?at
> >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
> >> >>
> >> >>
> >> >> ?at
> >> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
> >> >>
> >> >>
> >> >> ?at Main.main(Main.java:52)
> >> >> *****
> >> >>
> >> >> This error also occurring when I'm trying to launch program using
> >> >> system JRE (windows xp sp2, JRE 1.6.0_16).
> >> >>
> >> >> Can anyone help me..?
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> 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
> >> >
> >> >
> >>
> >> Thanks for reply, Oleg.
> >> So.. Why is it working fine in netbeans..?
> >>
> >
> > Because Eclipse and Netbeans are two completely different things. Check your
> > local setup.
> >
> > Oleg
> >
> >
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> 
> What do you mean for "local setup"?
>

Eclipse configuration, such as proxy settings, TCP/IP settings, firewall settings, if you are using one, anything that has to do with connectivity.

You 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.

Oleg

 
> ---------------------------------------------------------------------
> 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


Re: HttpClient

Posted by Al Jesco <al...@gmail.com>.
2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
> On Wed, Aug 19, 2009 at 01:00:23PM +0300, Al Jesco wrote:
>> 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
>> > On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
>> >> Hello all!
>> >> I'm using HttpClient 4.0 and got some error.
>> >> There's code I tested
>> >>
>> >> *****
>> >> ? ? ?DefaultHttpClient httpclient = new DefaultHttpClient();
>> >> ? ? ?HttpGet httpget = new HttpGet("http://yandex.ru");
>> >> ? ? ?HttpResponse response = httpclient.execute(httpget);
>> >> ? ? ?HttpEntity entity = response.getEntity();
>> >> ? ? ?System.out.println("Login form get: " + response.getStatusLine());
>> >> ? ? ?if (entity != null) {
>> >> ? ? ? ? ?entity.consumeContent();
>> >> ? ? ?}
>> >> ? ? ?System.out.println("Initial set of cookies:");
>> >> ? ? ?List<Cookie> cookies = httpclient.getCookieStore().
>> >> getCookies();
>> >> ? ? ?if (cookies.isEmpty()) {
>> >> ? ? ? ? ?System.out.println("None");
>> >> ? ? ?} else {
>> >> ? ? ? ? ?for (int i = 0; i < cookies.size(); i++) {
>> >> ? ? ? ? ? ? ?System.out.println("- " + cookies.get(i).toString());
>> >> ? ? ? ? ?}
>> >> ? ? ?}
>> >> ? ? ?httpclient.getConnectionManager().shutdown();
>> >> *****
>> >>
>> >> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
>> >> httpclient.execute(httpget) works successfully.
>> >> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
>> >>
>> >>
>> >
>> > 'Software caused connection abort: socket write error' usually means the
>> > connection has been terminated abnormally either by the target server, or by an
>> > intermediate proxy or due to some other kind of connectivity issue.
>> >
>> > This problem has nothing to do with Httpclient and is likely to be a problem
>> > with your local setup.
>> >
>> > Oleg
>> >
>> >
>> >
>> >> *****
>> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> >> execute
>> >> INFO: I/O exception (java.net.SocketException) caught when processing
>> >> request: Software caused connection abort: socket write error
>> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> >> execute
>> >> INFO: Retrying request
>> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> >> execute
>> >> INFO: I/O exception (java.net.SocketException) caught when processing
>> >> request: Software caused connection abort: socket write error
>> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> >> execute
>> >> INFO: Retrying request
>> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> >> execute
>> >> INFO: I/O exception (java.net.SocketException) caught when processing
>> >> request: Software caused connection abort: socket write error
>> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> >> execute
>> >> INFO: Retrying request
>> >> Exception in thread "main" java.net.SocketException: Software caused
>> >> connection abort: socket write error
>> >> ?at java.net.SocketOutputStream.socketWrite0(Native Method)
>> >> ?at java.net.SocketOutputStream.socketWrite(Unknown Source)
>> >> ?at java.net.SocketOutputStream.write(Unknown Source)
>> >> ?at
>> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
>> >>
>> >>
>> >> ?at
>> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
>> >>
>> >>
>> >> ?at Main.main(Main.java:52)
>> >> *****
>> >>
>> >> This error also occurring when I'm trying to launch program using
>> >> system JRE (windows xp sp2, JRE 1.6.0_16).
>> >>
>> >> Can anyone help me..?
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>> >
>> >
>>
>> Thanks for reply, Oleg.
>> So.. Why is it working fine in netbeans..?
>>
>
> Because Eclipse and Netbeans are two completely different things. Check your
> local setup.
>
> Oleg
>
>
>> ---------------------------------------------------------------------
>> 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
>
>

What do you mean for "local setup"?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: HttpClient

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, Aug 19, 2009 at 01:00:23PM +0300, Al Jesco wrote:
> 2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
> > On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
> >> Hello all!
> >> I'm using HttpClient 4.0 and got some error.
> >> There's code I tested
> >>
> >> *****
> >> ? ? ?DefaultHttpClient httpclient = new DefaultHttpClient();
> >> ? ? ?HttpGet httpget = new HttpGet("http://yandex.ru");
> >> ? ? ?HttpResponse response = httpclient.execute(httpget);
> >> ? ? ?HttpEntity entity = response.getEntity();
> >> ? ? ?System.out.println("Login form get: " + response.getStatusLine());
> >> ? ? ?if (entity != null) {
> >> ? ? ? ? ?entity.consumeContent();
> >> ? ? ?}
> >> ? ? ?System.out.println("Initial set of cookies:");
> >> ? ? ?List<Cookie> cookies = httpclient.getCookieStore().
> >> getCookies();
> >> ? ? ?if (cookies.isEmpty()) {
> >> ? ? ? ? ?System.out.println("None");
> >> ? ? ?} else {
> >> ? ? ? ? ?for (int i = 0; i < cookies.size(); i++) {
> >> ? ? ? ? ? ? ?System.out.println("- " + cookies.get(i).toString());
> >> ? ? ? ? ?}
> >> ? ? ?}
> >> ? ? ?httpclient.getConnectionManager().shutdown();
> >> *****
> >>
> >> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
> >> httpclient.execute(httpget) works successfully.
> >> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
> >>
> >>
> >
> > 'Software caused connection abort: socket write error' usually means the
> > connection has been terminated abnormally either by the target server, or by an
> > intermediate proxy or due to some other kind of connectivity issue.
> >
> > This problem has nothing to do with Httpclient and is likely to be a problem
> > with your local setup.
> >
> > Oleg
> >
> >
> >
> >> *****
> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> execute
> >> INFO: I/O exception (java.net.SocketException) caught when processing
> >> request: Software caused connection abort: socket write error
> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> execute
> >> INFO: Retrying request
> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> execute
> >> INFO: I/O exception (java.net.SocketException) caught when processing
> >> request: Software caused connection abort: socket write error
> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> execute
> >> INFO: Retrying request
> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> execute
> >> INFO: I/O exception (java.net.SocketException) caught when processing
> >> request: Software caused connection abort: socket write error
> >> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
> >> execute
> >> INFO: Retrying request
> >> Exception in thread "main" java.net.SocketException: Software caused
> >> connection abort: socket write error
> >> ?at java.net.SocketOutputStream.socketWrite0(Native Method)
> >> ?at java.net.SocketOutputStream.socketWrite(Unknown Source)
> >> ?at java.net.SocketOutputStream.write(Unknown Source)
> >> ?at
> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131)
> >>
> >>
> >> ?at
> >> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
> >>
> >>
> >> ?at
> >> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
> >>
> >>
> >> ?at Main.main(Main.java:52)
> >> *****
> >>
> >> This error also occurring when I'm trying to launch program using
> >> system JRE (windows xp sp2, JRE 1.6.0_16).
> >>
> >> Can anyone help me..?
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> 
> Thanks for reply, Oleg.
> So.. Why is it working fine in netbeans..?
> 

Because Eclipse and Netbeans are two completely different things. Check your
local setup.

Oleg


> ---------------------------------------------------------------------
> 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


Re: HttpClient

Posted by Al Jesco <al...@gmail.com>.
2009/8/19 Oleg Kalnichevski <ol...@apache.org>:
> On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
>> Hello all!
>> I'm using HttpClient 4.0 and got some error.
>> There's code I tested
>>
>> *****
>>      DefaultHttpClient httpclient = new DefaultHttpClient();
>>      HttpGet httpget = new HttpGet("http://yandex.ru");
>>      HttpResponse response = httpclient.execute(httpget);
>>      HttpEntity entity = response.getEntity();
>>      System.out.println("Login form get: " + response.getStatusLine());
>>      if (entity != null) {
>>          entity.consumeContent();
>>      }
>>      System.out.println("Initial set of cookies:");
>>      List<Cookie> cookies = httpclient.getCookieStore().
>> getCookies();
>>      if (cookies.isEmpty()) {
>>          System.out.println("None");
>>      } else {
>>          for (int i = 0; i < cookies.size(); i++) {
>>              System.out.println("- " + cookies.get(i).toString());
>>          }
>>      }
>>      httpclient.getConnectionManager().shutdown();
>> *****
>>
>> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
>> httpclient.execute(httpget) works successfully.
>> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
>>
>>
>
> 'Software caused connection abort: socket write error' usually means the
> connection has been terminated abnormally either by the target server, or by an
> intermediate proxy or due to some other kind of connectivity issue.
>
> This problem has nothing to do with Httpclient and is likely to be a problem
> with your local setup.
>
> Oleg
>
>
>
>> *****
>> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> execute
>> INFO: I/O exception (java.net.SocketException) caught when processing
>> request: Software caused connection abort: socket write error
>> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> execute
>> INFO: Retrying request
>> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> execute
>> INFO: I/O exception (java.net.SocketException) caught when processing
>> request: Software caused connection abort: socket write error
>> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> execute
>> INFO: Retrying request
>> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> execute
>> INFO: I/O exception (java.net.SocketException) caught when processing
>> request: Software caused connection abort: socket write error
>> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector
>> execute
>> INFO: Retrying request
>> Exception in thread "main" java.net.SocketException: Software caused
>> connection abort: socket write error
>>  at java.net.SocketOutputStream.socketWrite0(Native Method)
>>  at java.net.SocketOutputStream.socketWrite(Unknown Source)
>>  at java.net.SocketOutputStream.write(Unknown Source)
>>  at
>> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106)
>>
>>
>>  at
>> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113)
>>
>>
>>  at
>> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260)
>>
>>
>>  at
>> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248)
>>
>>
>>  at
>> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154)
>>
>>
>>  at
>> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131)
>>
>>
>>  at
>> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130)
>>
>>
>>  at
>> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
>>
>>
>>  at
>> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
>>
>>
>>  at
>> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
>>
>>
>>  at
>> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
>>
>>
>>  at Main.main(Main.java:52)
>> *****
>>
>> This error also occurring when I'm trying to launch program using
>> system JRE (windows xp sp2, JRE 1.6.0_16).
>>
>> Can anyone help me..?
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>

Thanks for reply, Oleg.
So.. Why is it working fine in netbeans..?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: HttpClient

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, Aug 18, 2009 at 09:01:38PM +0300, aljesco wrote:
> Hello all!
> I'm using HttpClient 4.0 and got some error.
> There's code I tested
>
> *****
>      DefaultHttpClient httpclient = new DefaultHttpClient();
>      HttpGet httpget = new HttpGet("http://yandex.ru");
>      HttpResponse response = httpclient.execute(httpget);
>      HttpEntity entity = response.getEntity();
>      System.out.println("Login form get: " + response.getStatusLine());
>      if (entity != null) {
>          entity.consumeContent();
>      }
>      System.out.println("Initial set of cookies:");
>      List<Cookie> cookies = httpclient.getCookieStore().
> getCookies();
>      if (cookies.isEmpty()) {
>          System.out.println("None");
>      } else {
>          for (int i = 0; i < cookies.size(); i++) {
>              System.out.println("- " + cookies.get(i).toString());
>          }
>      }
>      httpclient.getConnectionManager().shutdown();
> *****
>
> It's working fine in Netbeans 6.5.1 (using java 1.6.0_14) and
> httpclient.execute(httpget) works successfully.
> In Eclipse 3.4.2 (using java 1.6.0_16) this error is occurried.
>
>

'Software caused connection abort: socket write error' usually means the
connection has been terminated abnormally either by the target server, or by an
intermediate proxy or due to some other kind of connectivity issue.

This problem has nothing to do with Httpclient and is likely to be a problem
with your local setup.

Oleg



> *****
> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector  
> execute
> INFO: I/O exception (java.net.SocketException) caught when processing
> request: Software caused connection abort: socket write error
> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector  
> execute
> INFO: Retrying request
> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector  
> execute
> INFO: I/O exception (java.net.SocketException) caught when processing
> request: Software caused connection abort: socket write error
> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector  
> execute
> INFO: Retrying request
> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector  
> execute
> INFO: I/O exception (java.net.SocketException) caught when processing
> request: Software caused connection abort: socket write error
> 18.08.2009 0:21:54 org.apache.http.impl.client.DefaultRequestDirector  
> execute
> INFO: Retrying request
> Exception in thread "main" java.net.SocketException: Software caused
> connection abort: socket write error
>  at java.net.SocketOutputStream.socketWrite0(Native Method)
>  at java.net.SocketOutputStream.socketWrite(Unknown Source)
>  at java.net.SocketOutputStream.write(Unknown Source)
>  at  
> org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:106) 
> 
>
>  at  
> org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:113) 
> 
>
>  at  
> org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:260) 
> 
>
>  at  
> org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:248) 
> 
>
>  at  
> org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:154) 
> 
>
>  at  
> org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:131) 
> 
>
>  at  
> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:130) 
> 
>
>  at  
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447) 
> 
>
>  at  
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) 
> 
>
>  at  
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) 
> 
>
>  at  
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) 
> 
>
>  at Main.main(Main.java:52)
> *****
>
> This error also occurring when I'm trying to launch program using
> system JRE (windows xp sp2, JRE 1.6.0_16).
>
> Can anyone help me..?
>
>
> ---------------------------------------------------------------------
> 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