×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Instable http connection: IOException: -34

    Hi all. I have an app running in a Nokia E50 that uses http connection. Most of the time, it works fine. But 1 out of 5 times (obviously, not a predictable number), it throws an IOException: -34 when I call openInputStream. Anyone has any clue about this issue? Is that a firmware problem? The code:

    hc = (HttpConnection) Connector.open(getURL());
    hc.setRequestMethod(HttpConnection.POST);
    hc.setRequestProperty("User-Agent", "XXX");
    hc.setRequestProperty("Content-Language", "en-US");
    hc.setRequestProperty("Content-Length", "" + qs.length());
    out = hc.openOutputStream();
    out.write(qs.getBytes());
    in = hc.openInputStream(); <===== Exception is throw here!!!
    response = this.read(in);

    Thanks in advance for any help.

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Instable http connection: IOException: -34

    Hello DanielNovy,

    regarding making HTTP connection: what kind of server are you connecting with your MIDlet? Can you test (for example by using PC) whether the connection to the server always works ok?

    Here's a similar (if not entirely identical) discussion, please view if any of the discussion items within the thread could be of some use:

    http://discussion.forum.nokia.com/fo...ad.php?t=32559

    Regards,
    r2j7

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Re: Instable http connection: IOException: -34

    Thanks for you reply, r2j7. I looked at the discussion you pointed. All my connections are being closed with a finally block. My midlet is connecting to a tomcat server and it's always available. Using the emulator I don't have this problem.

    I really think that it's a problem with the E50 because I get this problem even when I'm using the native browser. One out of five times that I request a page, it fails.

    This kind of thing didn't happen in my previous phone, Nokia 6230i. The midlet used to work just fine.

    Should a firmware update fix that problem?

Similar Threads

  1. How to cancel a http connection mid-way
    By capricious28 in forum Mobile Java General
    Replies: 0
    Last Post: 2007-08-10, 10:42
  2. HTTP connection on S60 2nd FP2
    By apokalychys in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2007-05-24, 13:30
  3. remote host address(of socket and http connection as well)
    By p_joon in forum Mobile Java General
    Replies: 1
    Last Post: 2007-03-05, 07:04
  4. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java General
    Replies: 1
    Last Post: 2005-06-24, 10:46
  5. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-24, 09:29

Posting Permissions

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