Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Jul 2009

    java.io.IOException: -36


    I have a big problem with sending data in Nokia S60 (both on emulator and real device).
    Sometimes java.io.IOException: -36 occurs when I try to connect to my Servlet ! I checked on http://wiki.forum.nokia.com/index.php/Error_codes website that "-36" means :

    A function could not be executed because the required session was disconnected. .

    OK, but what is REALLY means ? Why the required session was disconnected...?

    It happens very unpredictable. Sometimes is can occur in one of the first communications but sometimes after several minutes (after device and servlet changed many data between each other).

    It takes place no matter it is HTTP or HTTPS (HttpConnection/HttpsConnection). Also it was tested on JBOSS and Webshpere - the same result.

    My code is :

    	if (url.startsWith("https"))
    		hcon = (HttpsConnection) Connector.open(url, Connector.READ_WRITE);
    		hcon.setRequestProperty("accept", "*/*");
    	        hcon = (HttpConnection) Connector.open(url, Connector.READ_WRITE);
    	hcon = (HttpConnection) Connector.open(url, Connector.READ_WRITE);
    	hcon.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");			
    	if (!image && Configuration.GZIPED) {
    		hcon.setRequestProperty("Accept-Encoding", "gzip");
    	if (cookie != null) {
    		hcon.setRequestProperty("cookie", cookie);
    	hcon.setRequestProperty("Content-Length", "" + contentLength);
    	hcon.setRequestProperty("User-agent", Context.instance().getPlatform());
    	OutputStream oStrm = hcon.openOutputStream();
    	logger.debug("HttpClient.processRequest(...): Before stream writing");
    	logger.debug("HttpClient.processRequest(...): After stream writing");
    catch (...)
    	if (oStrm != null)
    		catch (Throwable t)
    			logger.error("HttpClient.processRequest(...): Output stream closing failed: " + t);
    			if (t instanceof IOException) 
    				throw (IOException) t;
    responseCode = hcon.getResponseCode();
    is = hcon.openInputStream();
    after that I read data from stream.

    Here is fragment of my log from device :
    [DEBUG][30-07-2009 15:29:43,605 UTC]HttpClient.processRequest(...): Before stream writting
    [DEBUG][30-07-2009 15:29:43,808 UTC]HttpClient.processRequest(...): After stream writting
    [ERROR][30-07-2009 15:29:44,786 UTC]HttpClient.processRequest(...): Output stream closing failed: java.io.IOException: -36

    Please, help me! I'm woeful... I have no idea why it happens... I digged the internet but I as far I didn't find correct solution. Maybe something is wrong with the Servlet...?

    // EDIT
    I used Wireshark to get closer to problem. The result is http://img187.imageshack.us/img187/4142/wiresharku.png

    The interesting thing is that server ( sent some RST packet! (the highlighted blue row). The IOException occured after I tried send message (no. 32912 on screen) after this RST packet. But WHY server sends this packet ??? Is something wrong in above packets ???

    Please, help.
    Last edited by Sratytaty; 2009-07-31 at 12:03.

Similar Threads

  1. retrieving MMS with WSP Get??!!!
    By nicoleta in forum General Messaging
    Replies: 8
    Last Post: 2010-12-09, 22:03
  2. S60Ex\WebClient CONE 36 on exit
    By nickager in forum Symbian Tools & SDKs
    Replies: 10
    Last Post: 2007-08-09, 10:49
  3. New Found Error.. SymbianOSError: -36 Disconnected
    By mark.ramos222 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-04-12, 01:26
  4. java.io.IOException in emulator
    By remonvv in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2004-08-03, 13:59
  5. Concept emulator
    By vvin in forum General Messaging
    Replies: 2
    Last Post: 2002-07-19, 13:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts