×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    93

    Thumbs up java.lang.NullPointerException issue while trigger OK command

    I have One List in a form, if i click a particular item in that list, it will start download another List(xml file) from server. After downloading, it shows a dialog like "Download completed" with "ok" command.

    My issue is, if click on "OK" command, it will not go to Next form(Next list).The dialog disposed and display same form only. Also If i click "OK" commmand it shows exception like,

    java.lang.NullPointerException
    at dz.a(+1327)
    at be.a(+24)
    at be.a(+89)
    at bf.k(+31)
    at bf.h(+26)
    at bl.d(+46)
    at s.a(+595)
    at be.a(+24)
    at be.a(+89)
    at cf.k(+71)
    at cf.e(+20)
    at s.b(+80)
    at bl.b(+87)
    at z.g(+197)
    at z.b(+146)
    at cw.run(+231)
    java.lang.NullPointerException

    What is the problem in my coding..plz help me.......Also my coding is below.....


    final Dialog dlg2 = new Dialog("Message");
    Label lbl2 = new Label("Download");
    dlg2.addComponent(lbl2);
    Label lbl3 = new Label("Completed");
    dlg2.addComponent(lbl3);

    Command cmdok1=new Command("OK");
    dlg2.addCommand(cmdok1);

    Command cmd1 = dlg2.showDialog();

    if(cmd1==cmdok1)
    {
    try {
    dlg2.dispose();
    mite.show(); //mite is my next form(next list)
    } catch (Exception e) {
    mite.show(); // I tried to show next form, but it is also not working.
    }

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: java.lang.NullPointerException issue while trigger OK command

    It looks that your next form - mite is null, is it initialized before? Where is it created?
    Thanks,
    Ekta

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

    Re: java.lang.NullPointerException issue while trigger OK command

    Command cmd1 is not initealized, can you try to create the same and test?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    93

    Re: java.lang.NullPointerException issue while trigger OK command

    Thank You ektasrv. I have cleared my issue. Actually i was initialized that form in another if block. That's why this error occurs.

    Also Thank You Raj.

Similar Threads

  1. java lang nullpointerexception
    By j2meSak in forum Mobile Java Media (Graphics & Sounds)
    Replies: 7
    Last Post: 2009-11-19, 05:46
  2. java.lang.NullPointerException
    By littleson in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-02-06, 16:13
  3. [moved] Error: java.lang.NullPointerException while compiling
    By manish.garg in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-11-20, 22:14
  4. java.lang.nullpointerexception
    By maneeshv6 in forum Mobile Java General
    Replies: 2
    Last Post: 2008-03-25, 09:36
  5. java/lang/NullPointerException
    By chyrania in forum General Development Questions
    Replies: 0
    Last Post: 2007-09-18, 17:15

Posting Permissions

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