Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003

    Series 40 problem -- Answer "No" to Allow Web Access?


    When I open an Http connection on the 7210 the first time in my application, I get the standard "Allow Web Access? (Yes/No)" question.

    If I answer No, the Connector.getConnection() method throws a NullPointer exception which I cannot seem to catch.
    The phone display reads "Application Error". Under details, "java.lang.NullPointerException".

    On the 3650, I was able to handle the "No" response by catching the resulting IOException (code = -33 or such). But seemingly Series 40 phones can't handle this. I am especially concerned about this issue as I have seen this uncatchable NullPointer occasionally with other Http requests and don't fully understand it.

    I am using standard HttpConnection code:

    HttpConnection conn = (HttpConnection) Connector.open(request.url + request.requestStr);

    // never reached during error condition.
    if (conn == null) {
    return null;
    conn.setRequestProperty("Connection", "close");

    InputStream is = conn.getInputStream();

    Has anyone else seen this or have any ideas on how to catch this exception or prevent it from happening?



  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    I'm using a 6100 (Series 40), and it throws me an IOException in the same situation. Are you using a "real" 7210, or the emulator? My firmware version reports 04.01.

    (Sorry, that doesn't solve your problem, but maybe it's limited to old 7210s?)


  3. #3
    Registered User
    Join Date
    Mar 2003
    Graham -

    Thanks for your post! The firmware on most of our series 40 phones is new enough (3.02, 3.05). I found the null pointer exception in my own error handling and isolated the IOException.

    I think I was just frustrated by some earlier firmware on the 7210 (last Winter) and assumed it still had some bugs.


Posting Permissions

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