Hi, I would like some help with this error. I can not find the way to go 
with this. The error is: The operation timed out

I have two projects stopped by this error, and can not find the solution. I 
set the value of the timeout to zero, so I never stops for time. But I 
never work and always return the same error after a long time.

This is the full error:

09-07 13:54:22.823: E/ServicioRest(8804): java.net.SocketException: The 
> operation timed out
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native
>  
> Method)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.harmony.luni.platform.OSNetworkSystem.connect(OSNetworkSystem.java:115)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:244)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> java.net.Socket.connect(Socket.java:1055)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> com.silm.request.OrderRequestParser.listOrderRequest(OrderRequestParser.java:49)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> com.silm.activities.InboxHandler.initComponents(InboxHandler.java:86)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> com.silm.activities.InboxHandler.onCreate(InboxHandler.java:70)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.app.ActivityThread.access$2300(ActivityThread.java:125)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.os.Handler.dispatchMessage(Handler.java:99)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.os.Looper.loop(Looper.java:123)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> android.app.ActivityThread.main(ActivityThread.java:4627)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> java.lang.reflect.Method.invokeNative(Native Method)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> java.lang.reflect.Method.invoke(Method.java:521)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> 09-07 13:54:22.823: E/ServicioRest(8804): at 
> dalvik.system.NativeStart.main(Native Method)


This is where the error comes from:


try {
/*
HttpParams httpParameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParameters, 0);
HttpConnectionParams.setSoTimeout(httpParameters, 0);
HttpConnectionParams.setTcpNoDelay(httpParameters, true);
*/
httpClient = new DefaultHttpClient();
del = new HttpGet(url);
del.setHeader("content-type", "application/json");
 HttpResponse resp = httpClient.execute(del);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to