×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Eclipse, Midlet -> Invalid application

    I have ran into problems when I'm trying to run my MIDlet in Nokia 6131 NFC phone. After installation, my MIDlet has a red cross over its icon in the phone. When I try to start MIDlet, the phone says “Invalid application. Delete?”


    I’m using Eclipse 3.2 and Nokia_6131_NFC_SDK_1_1 and my MIDlet runs fine in Nokia emulator. If I install Nokia's test programs to my phone, they all work fine.

    Perhaps the problem occurs during Eclipse Export.

    My jad file looks like this:
    MIDlet-Version: 1.0.0
    MIDlet-Vendor: Me
    MIDlet-Jar-URL: MyMidlet.jar
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-1: MyMIDlet,,midlet.MyMIDlet
    MIDlet-Name: MyMidlet
    MIDlet-Jar-Size: 35566


    Can anybody tell me, how I should Export jar file to run the Midlet in Nokia NFC phone?

    What is the difference between jad / manifest files? During Export, there is no Main class (application entry point).

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Eclipse, Midlet -> Invalid application

    Do you transfer the JAR file or only JAD file (or both of them)? The JAR contains the code...
    What is your MIDlet trying to do? Does it try to access anything which requires signing?

    There are many differences between JAD and manifest even though they contain partially same information. The role of JAD is to be a small "descriptive" file about the application, in order to let the user and phone know if the application is worthwhile to be downloaded on the phone (too big, does it work, etc). Also the signing information is stored in the JAD (not in the manifest, which is inside the JAR)

    Read some more information from the MIDP spec, for example from here
    http://java.sun.com/javame/reference...e-summary.html

    Hartti

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Re: Eclipse, Midlet -> Invalid application

    Hello,

    I transfer jar file only.
    Midlet reads RFID tags, and stores them into phone memory. Does these tasks need signing?

    Thanks!

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Eclipse, Midlet -> Invalid application

    I do not think this is signing related...

    What are the contents of manifest file (inside the JAR)?

    Hartti

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    9

    Re: Eclipse, Midlet -> Invalid application

    I don't know if this is related or not, but I remember that I found this problem once on a S40 phone (although the same JAR worked on S60 phones) - the solution I found was setting my IDE (netbeans 5.5) to not obsfuscate the JAR - it solved the problem for me.
    Last edited by yusuf_kasidit; 2008-06-08 at 02:26.

  6. #6
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Re: Eclipse, Midlet -> Invalid application

    Hello,

    Manifest file:

    Manifest-Version: 1.0
    MIDlet-Name: MyMidlet
    MIDlet-Version: 1.0.0
    MIDlet-Vendor: unknown
    MIDlet-1: MyMIDlet, , midlet.MyMIDlet
    MicroEdition-Profile: MIDP-2.0
    MicroEdition-Configuration: CLDC-1.1

    I just noticed that CLDC has difference and Vendor is "unknown".

    Could these be the problem?


    Thanks

  7. #7
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Eclipse, Midlet -> Invalid application

    the MIDlet-Vendor attribute exists, and is enough.

    Does the jar include the midlet.MyMIDlet class?

    Hartti

  8. #8
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Re: Eclipse, Midlet -> Invalid application

    Hello,

    Now, after many tries, I found out that the problem is differences between jad and manifest files.
    If I delete jad file away, midlet installs to phone ok. But after start it says /ClassNotFoundException/... .
    If I have jad file in directory after start it says /VerifyError:midlet/....

    So problem must be in jad/manifest.

    Thanks.

  9. #9
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Re: Eclipse, Midlet -> Invalid application

    Hello,

    Problem solved.

    I install (again) EclipseMe, then I convert my project to MIDP project (right click project / J2ME).

    After this, I simply Create Package (right click project/J2ME/Create package) -> Install to phone - > it works!

    Thanks to all for help!

    Now, it is time to start testing...

  10. #10
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Re: Eclipse, Midlet -> Invalid application

    Hello again,

    It works fine, once.

    Now, Nokia emulator does not work. It complains "WARNING: JAD file doesn't define required attribute MIDlet-Name".
    I can not add attributes because emulator creates new folder on each run.

    Also, if I make an new Package (J2ME tool) it does not work in phone.
    J2ME tool creates \deployed folder where jar and jad file are created.
    Jad file has only one row, jar size. Manifest is missing.
    If I add new rows to jad file, it will reset back every time when J2ME does something to it.

    I totally confused whit this.

    Can someone tell me how this must be done?

    Thanks!

  11. #11
    Registered User
    Join Date
    Jun 2005
    Posts
    10

    Re: Eclipse, Midlet -> Invalid application

    I've had similar problems. Try setting the version number to 1.0 in my case the version number was the problem

  12. #12
    Registered User
    Join Date
    Jan 2010
    Posts
    7

    Re: Eclipse, Midlet -> Invalid application

    Hi!
    I've a similar problem to, I've tried to follow the advices of this forum but nothing seems to work:
    I created a j2me program which works fine on nokia emulator, then I'me able to install it on my phone (nokia 6131 nfc) after exporting form eclipse the jar file, but when I try to run it I get: "invalid application"?
    Does anyone have any clue of the reason of this?
    Thanks...

  13. #13
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Eclipse, Midlet -> Invalid application

    Did you read this?

    Check that you have a MIDlet-1 attribute in your MANIFEST.

    If that document doesn't help, please post your JAD (if you're installing one) and the JAR's MANIFEST.

    Graham.

  14. #14
    Registered User
    Join Date
    Jan 2010
    Posts
    7

    Re: Eclipse, Midlet -> Invalid application

    Thankyou for your help.
    I tried with a very simple hello world programm and I did the checking explained in the link you posted me, it seems everything ok to me but when I try to run the jar in the phone I get the same error: "invalid application".
    Here my jar's manifest:

    Manifest-Version: 1.0
    MIDlet-Vendor: Midlet Suite Vendor
    MIDlet-Version: 1.0.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Name: prova9 Midlet Suite
    MicroEdition-Profile: MIDP-2.0

  15. #15
    Registered User
    Join Date
    Aug 2008
    Posts
    39

    Re: Eclipse, Midlet -> Invalid application

    On some phones it might be a problem having a space or something like that at the end of the attribute name. And just to exclude that problem. You build on a windows machine right? Because on some linux machines there seems to be a problem with the character encoding and than it fails too.

Similar Threads

  1. calling midlet from midlet throws SecurityException on 6600
    By brianpegan in forum Mobile Java General
    Replies: 3
    Last Post: 2010-10-25, 05:31
  2. Invalid Application in CDMA Mobiles
    By pmramprasath in forum Mobile Java General
    Replies: 12
    Last Post: 2007-08-06, 09:33
  3. Invalid Application
    By shivaapp in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2007-08-03, 13:51
  4. 技术文档:MIDP 2.0安全机制 与 MIDlet 数字签名
    By wotrust in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-12-30, 07:42
  5. Installation failed with signed MIDlet (Invalid revocation server)
    By greusser in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-02-25, 08:32

Posting Permissions

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