Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Oct 2005

    error sending data to the server. SymbianOS error -1

    I have an application that sends data to a servlet. It has been working fine on the WTK emulator.

    When I run it on a nokia 6630 (this is the only phone i have tried it on) I get the following error:

    Error connecting to the server:

    SymbianOS error = -1:
    System error

    my code to connect is as follows:
            HttpConnection conn = null;
                progDisplay("Connecting to the server..." );
                conn = (HttpConnection)Connector.open( url );
                sendData(conn, data);
             catch( IOException e )
                progDisplay("Error connecting to the server:" + "\n" + e.getMessage());
        private void sendData(HttpConnection conn, byte[] data)  throws IOException
            conn.setRequestMethod( HttpConnection.POST );
            conn.setRequestProperty("Content-Language", "en-US" );
            conn.setRequestProperty("Accept", "application/octet-stream" );
            conn.setRequestProperty("Connection", "close" );
            conn.setRequestProperty("Content-Length", Integer.toString( data.length ) );
            OutputStream os = conn.openOutputStream();
            os.write( data );
    I got it to output progress information when in the sendData() method and it stopped between os.write( data ); and os.close(); By that i mean i got it to print out a message after every step in that method, the last message that got printed was just after os.write( data );

    Why would there be a problem closing the stream??

    Any help would be much appreciated.
    Last edited by dihex; 2005-11-15 at 18:58. Reason: change title

Similar Threads

  1. suckho, i have encontered the same problems. Could you tell me how you resolved it?
    By dicson_hu in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2005-12-09, 10:56
  2. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  3. Nokia 6600 Socket Server send delay Problem
    By dicson_hu in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-31, 07:37
  4. Cannot to receive data from server...
    By ramis55 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-05-09, 13:46

Posting Permissions

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