×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    1

    IOException java.io.IOException: 40-Error in HTTP operation

    Hi,

    i am opening an Http Connection to Download an image, i doing it as shown below. but when i call getResponseCode() , Exception Happens.
    i am using S40 6th Edition SDK With Netbeans.

    HttpConnection httpConn = null;
    InputStream is = null;
    httpConn = (HttpConnection)Connector.open(url);
    httpConn.setRequestMethod(HttpConnection.GET);
    if((httpConn.getResponseCode() == HttpConnection.HTTP_OK)){ // Exception Happens here
    int length = (int)httpConn.getLength();
    is = httpConn.openInputStream();

    Thanks
    @Rain

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: IOException java.io.IOException: 40-Error in HTTP operation

    Hi Rain,

    Is your GPRS Connection is working ? Check your native web browser is that working fine first . Then check your access point setting for the application ? Which connection it is using is it the same connection which is using for the default web browser ? It not set that for your application.

    Is your server is alive from where you are downloading the image .

    Check all these things .

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    376

    Re: IOException java.io.IOException: 40-Error in HTTP operation

    there must be problem in connection or http address defined improperly

Similar Threads

  1. java.io.IOException: Error in HTTP operation
    By varma_111 in forum Mobile Java Networking & Messaging & Security
    Replies: 19
    Last Post: 2011-10-16, 09:27
  2. Nokia NFC 6212 emulator: java.io.ioexception: error in http operation
    By mpharsha in forum Near Field Communication
    Replies: 1
    Last Post: 2010-09-14, 13:39
  3. java.io.IOException: Error in HTTP operation on S-40 Emulator
    By Rupa in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2010-07-07, 20:32
  4. Getting java.io.IOException: Error in Http operation
    By techendeavour_abhijeet in forum Mobile Java General
    Replies: 3
    Last Post: 2009-05-29, 07:18

Posting Permissions

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