×

Discussion Board

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

    Question Application is not running in S40 Emulator as well as Nokia x2-01 mobile

    Hello Friends,

    I have created application using J2ME Visual Midlet in NetBeans. That time we checked in default devices. And its working fine. Now the targeted device is Nokia X2-01 QWERTY Mobile. So, I installed Series_40_6th_Edition_SDK_FP1_v1_0_en and configured it. But its not working for my Application. Some time getting Invalid Application. and when it works, then getting below issue.

    When I am trying to access GPRS I am getting error
    Code:
    HTTP request: method=POST
    HTTP request: URL=http://localhost:8084/GeneralApplication/CheckSession?UserName=a&Password=a
    Exception: java/io/IOException
            at com.sun.midp.io.j2me.http.Protocol.checkForException(+51)
            at com.sun.midp.io.j2me.http.Protocol.readResponseMessage_wap(+38)
            at com.sun.midp.io.j2me.http.Protocol.connect_wap(+649)
            at com.sun.midp.io.j2me.http.Protocol.connect(+107)
            at com.sun.midp.io.j2me.http.Protocol.getResponseCode(+21)
            at pkg.com.log.LoginForm$authentication.run(LoginForm.java:3719)
    At Line 3719: I have this code :
    Code:
    if (conn.getResponseCode() == HttpConnection.HTTP_OK) {
    This is working fine in default configuration.
    When I am trying to start other midlet in same Application, I am getting this error :
    Code:
    Exception: java/lang/ArrayIndexOutOfBoundsException
            at javax.microedition.lcdui.ChoiceGroup.setSelectedFlags(+61)
            at pkg.com.log.ONOFFAPP1.initialize(ONOFFAPP1.java:111)
            at pkg.com.log.ONOFFAPP1.startApp(+18)
            at javax.microedition.midlet.MIDletProxy.startApp(+7)
    Where code is :
    Code:
     private void initialize() {                                         
            // write pre-initialize user code here
            choiceGroup_ProductCompany = new ChoiceGroup("Company:", Choice.POPUP);                                            
            choiceGroup_ProductCompany.setFitPolicy(Choice.TEXT_WRAP_DEFAULT);
            choiceGroup_ProductCompany.setSelectedFlags(new boolean[] {  }); // Error at this line
            choiceGroup_ProductName = new ChoiceGroup("Product :", Choice.POPUP);
    Above code is generated by NetBeans. and we can't change anything.
    Issue on the hand is very time sensitive.
    So please help.

    Thanking You,
    Hakoo S. Desai

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Application is not running in S40 Emulator as well as Nokia x2-01 mobile

    Hakoo, the issue(S) you have discussed here are two different issues.
    First is related the connection and other is related to the choice group.

    I am taking the Connection Issue first and would like to ask you these question to check the basic points:

    1. As you are calling the local URL, are you testing the app on real device or on emulator?
    2. Are you saying that the same code is working with the WTK, default emulator and not working with the Series_40_6th_Edition_SDK_FP1_v1_0_en?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    15

    Re: Application is not running in S40 Emulator as well as Nokia x2-01 mobile

    Thanks for your reply.
    I have tested whole Application on WTK emulator, and that is working fine on all configuration.

    Now come at Series_40_6th_Edition_SDK_FP1_v1_0_en.
    Yes, Here I am finding problems. Application is not working on neither Series 40 Emulator or on real Device. Getting same error
    Code:
    Exception: java/lang/ArrayIndexOutOfBoundsException
            at javax.microedition.lcdui.ChoiceGroup.setSelectedFlags(+61)
            at pkg.com.log.ONOFFAPP1.initialize(ONOFFAPP1.java:111)
            at pkg.com.log.ONOFFAPP1.startApp(+18)
            at javax.microedition.midlet.MIDletProxy.startApp(+7)
    on both when I try to open my second midlet.

    About Connection, still i didn't try on real device.
    Is it possible to get Nokia X2-01 Emulator?

    Thanking You.
    Hakoo Desai.

    Quote Originally Posted by raj_J2ME View Post
    Hakoo, the issue(S) you have discussed here are two different issues.
    First is related the connection and other is related to the choice group.

    I am taking the Connection Issue first and would like to ask you these question to check the basic points:

    1. As you are calling the local URL, are you testing the app on real device or on emulator?
    2. Are you saying that the same code is working with the WTK, default emulator and not working with the Series_40_6th_Edition_SDK_FP1_v1_0_en?

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Application is not running in S40 Emulator as well as Nokia x2-01 mobile

    Ahh the portion I was assuming to cover later, you started first. No worries...

    Well in that case why don't you try to debug the code related to the choice group I mean;

    1. First, please create the Boolean array that you wanna assign to the Choice Group, and check the length of the array and the length of the choice group., for example,
    Check the length of the Boolean array you are creating, using the array.length

    And then using the choiceGroup_ProductCompany.size(), check the size of the choice group, I am sure that the two are getting different in terms of length.

    Check and revert.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    Feb 2011
    Posts
    15

    Re: Application is not running in S40 Emulator as well as Nokia x2-01 mobile

    Actually, Thing is I am using Visual Midlet in NetBeans. So, its declared by Netbeans and couldn't edited. NetBeans Provides one option Lazy Initialized. And By default its true. But I made them false because we are accesing from other form. And which are not Lazy Initialized, those parts are put in Initialize() Method. All these are managed by NetBeans.

    If this I make this Lazy Initialized "true" then no more issue of arrays. But I am scare that my my whole application is working because of Lazy Initialized is false.
    About Debug, I am not Finding any values Except ChoiceGroup.length = null. Thing is, I could not open Midlet it seems, then How can I do any tests?
    Last edited by h_desai_j2me; 2011-05-07 at 07:55. Reason: Adding More Information

Similar Threads

  1. ComboBox which supports Icons as well as text?
    By jitesh.s in forum Symbian User Interface
    Replies: 1
    Last Post: 2010-02-15, 09:51
  2. Replies: 1
    Last Post: 2008-11-21, 12:12
  3. Delete Email from Phone as well as server!
    By kis_spn in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-06-13, 03:40
  4. Http not work well as background
    By symbian David in forum Symbian
    Replies: 1
    Last Post: 2007-08-23, 04:24
  5. Replies: 1
    Last Post: 2007-08-17, 08:16

Posting Permissions

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