×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    5

    N80 J2me intallation failure.

    Good day,

    My friend and I just created an J2ME application and we tried installing and it fails.

    We tried several versions of the Jar.
    1. CLDC 1.0, MIDP 1.0, JSR 75 = "Unable to install"
    2. CLDC 1.0, MIDP 1.0, *fake JSR 75 = "Authorisation failed "
    3. CLDC 1.0, MIDP 1.0 = "Unable to install"

    What could be wrong here? Where can we get more information on why it's not installing?

    Thanks,
    Franz See

    Note:
    *fake JSR 75 - our application has references to JSR 75 classes. So what we did was removed our dependency from JSR 75, and created classes with the same fully qualified class names as the JSR 75 classes that we are using.
    * Our midlet is not signed.

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

    Re: N80 J2me intallation failure.

    Your "fake JSR75"... as a rule, you are likely to have problems if you have classes in your JAR that are in packages java.*, javax.*, com.nokia.*, etc. You're not allowed to create classes in "system packages", as you would then be able to access package-private methods in system classes, and potentially by-pass the sandbox.

    Are you installing a JAD/JAR pair, or just the JAR? Are you installing over-the-air, or from a PC?

    If you're install a JAD/JAR pair, then attributes that appear in both the JAD and the Manifest must have identical values.

    Can you post the contents of your Manifest?

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

    Thumbs up Re: N80 J2me intallation failure.

    Hi,
    Which device you are talking about..?
    Series of the device, We would be interested to know..

    Which JSR's you are using in the code..??Please check that whether the same is allowed or not..

    One more thing is that ..check that jad file params and .mf file params (attributes) are similar..

    You can put the same here..
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    5

    Question Re: N80 J2me intallation failure.

    Quote Originally Posted by grahamhughes View Post
    Your "fake JSR75"... as a rule, you are likely to have problems if you have classes in your JAR that are in packages java.*, javax.*, com.nokia.*, etc. You're not allowed to create classes in "system packages", as you would then be able to access package-private methods in system classes, and potentially by-pass the sandbox
    ...
    Yes. Thanks. We only did that to see if our app's dependecy to the JSR 75 is causing the installation problem. Apparently it's not.

    Quote Originally Posted by grahamhughes View Post
    ...
    Are you installing a JAD/JAR pair, or just the JAR? Are you installing over-the-air, or from a PC?
    ...
    We're installing a JAR with a JAD in it.

    Quote Originally Posted by grahamhughes View Post
    ...
    If you're install a JAD/JAR pair, then attributes that appear in both the JAD and the Manifest must have identical values.

    Can you post the contents of your Manifest?
    Here they are:

    MANIFEST.MF
    Code:
    Manifest-Version: 1.0
    MIDlet-Vendor: Vendor-X
    MIDlet-Version: 1.0
    Built-By: franz
    Created-By: Vendor-X
    MIDlet-Name: My JME App
    Build-Jdk: 1.6.0_10
    MIDlet-1: My JME App, /pyx.png, org.vendorx.midlet.MyJM
     EAppMIDlet
    MicroEdition-Configuration: CLDC-1.0
    MIDlet-Icon: /pyx.png
    Archiver-Version: 1.0
    MicroEdition-Profile: MIDP-1.0
    MIDlet-Permissions: javax.microedition.io.Connector.file.read,javax.mi
     croedition.io.Connector.file.write
    my-jme-app.jad
    Code:
    MIDlet-Version: 1.0.0
    MIDlet-Vendor: Vendor X
    MIDlet-Jar-URL: my-jme-app.jar
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-1.0
    MIDlet-1: MyJMEAppMIDlet,,org.vendorx.midlet.MyJMEAppMIDlet
    MIDlet-Permissions: javax.microedition.io.file.FileSystemRegistry
    MIDlet-Name: MyJMEAppMIDlet
    Note: I see a lot of discrepancies. And I don't know which diff are important (but I'll try to make them identical as possible). Also, I can see that my MANIFEST.MF's 'MIDlet-1' and 'MIDlet-Permissions' values were split by white spaces prematurely. Is that an issue?

    Quote Originally Posted by raj_J2ME View Post
    Hi,
    Which device you are talking about..?
    Series of the device, We would be interested to know..
    ...
    N80 (S60)

    Quote Originally Posted by raj_J2ME View Post
    Hi,
    ...
    Which JSR's you are using in the code..??Please check that whether the same is allowed or not..
    ...
    Jar#1: CLDC 1.0, MIDP 1.0, JSR 75 = "Unable to install"
    Jar#2: CLDC 1.0, MIDP 1.0, *fake JSR 75 = "Authorisation failed "
    Jar#3: CLDC 1.0, MIDP 1.0 = "Unable to install"

    Quote Originally Posted by raj_J2ME View Post
    Hi,
    ...
    One more thing is that ..check that jad file params and .mf file params (attributes) are similar..

    You can put the same here..
    Thanks,
    I've posted my MANIFEST.MF and my-jme-app.jad contents above.

    Thanks

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

    Re: N80 J2me intallation failure.

    The JAD and Manifest do not have to contain the same set of attributes (JAD need not contain MicroEdition-Profile, for example). But, the following attributes must have identical values in both JAD and Manifest, or the application will not install.

    • MIDlet-1
    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor


    Identical is identical, so "1.0" and "1.0.0" are different.

    Your JAD should contain MIDlet-Jar-Size.

    Yes, lines more than 72 characters are not allowed in the Manifest, so they will be broken. The continuation line starts with a space.

    Many devices (including Series 60) will allow you to install a JAR, with no JAD. You can try this to see if the JAD is causing you problems.

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

    Thumbs up Re: N80 J2me intallation failure.

    Hi,
    I have face this issue and fix.
    Just test by removing all the optional params..just keep on adding one by one.
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  7. #7
    Registered User
    Join Date
    Dec 2008
    Posts
    5

    Lightbulb Re: N80 J2me intallation failure.

    Quote Originally Posted by grahamhughes View Post
    The JAD and Manifest do not have to contain the same set of attributes (JAD need not contain MicroEdition-Profile, for example). But, the following attributes must have identical values in both JAD and Manifest, or the application will not install.

    • MIDlet-1
    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor


    Identical is identical, so "1.0" and "1.0.0" are different.

    Your JAD should contain MIDlet-Jar-Size.

    ...
    I see. Very informative. Thanks

    Quote Originally Posted by grahamhughes View Post
    ...

    Yes, lines more than 72 characters are not allowed in the Manifest, so they will be broken. The continuation line starts with a space.

    ...
    Would that be a problem? If it will be, how can we remedy that?

    Quote Originally Posted by grahamhughes View Post
    ...

    Many devices (including Series 60) will allow you to install a JAR, with no JAD. You can try this to see if the JAD is causing you problems.
    I see. Thanks.

    I'll try out your suggestions and would probably reply by tomorrow ( it's already 9PM here, and our test unit is not with us ).

    Thanks again,
    Franz

  8. #8
    Registered User
    Join Date
    Dec 2008
    Posts
    5

    Question Re: N80 J2me intallation failure.

    Quote Originally Posted by raj_J2ME View Post
    Hi,
    I have face this issue and fix.
    Just test by removing all the optional params..just keep on adding one by one.
    Thanks,
    Optinal JAD paramters? Manifest paramters? or both?

    Are the only required params the one grahamhughes mentioned?

    • MIDlet-1
    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor


    Thanks

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

    Re: N80 J2me intallation failure.

    As a rule, the Manifest in the JAR must contain:

    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor
    • MIDlet-1
    • MicroEdition-Profile
    • MicroEdition-Configuration


    The JAD must contain:

    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor
    • MIDlet-Jar-URL
    • MIDlet-Jar-Size


    Where any of these appear in both files, they must be identical. The size of the JAR must be the size that appears in MIDlet-Jar-Size in the JAD.

    The reason is: normally, the device downloads the JAD (from a webserver) first. The information (name, version, vendor, size) is displayed to the user. If the user confirms, the JAR is downloaded. Size and manifest values are compared, to make sure that the JAR it downloaded is exactly what the JAD said it would be.

    Also: a device may refuse to install an application if it is already installed. An application is "the same as" an installed one if the MIDlet-Name, MIDlet-Vendor and MIDlet-Version match. When testing, make sure you delete old versions before installing new ones.

    Some devices will reject applications if the JAD or manifest refer to features that the device does not have. For example, if MicroEdition-Profile specifies MIDP-2.0 and the device supports only MIDP-1.0. (Note that MIDP and CLDC versions are backward-compatible, so all MIDP-2.0 devices are automatically MIDP-1.0 devices as well.)

    An application's code can refer to API classes that the device does not have. This will not usually prevent installation. (Of course, it might prevent the application from running.) For example: it is possible on most devices to detect the available APIs at run time, and load only the appropriate application classes. If an application does not install, it is not because you are using unsupported APIs in your code.

  10. #10
    Registered User
    Join Date
    Dec 2008
    Posts
    5

    Re: N80 J2me intallation failure.

    Quote Originally Posted by grahamhughes View Post
    As a rule, the Manifest in the JAR must contain:

    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor
    • MIDlet-1
    • MicroEdition-Profile
    • MicroEdition-Configuration


    The JAD must contain:

    • MIDlet-Name
    • MIDlet-Version
    • MIDlet-Vendor
    • MIDlet-Jar-URL
    • MIDlet-Jar-Size


    Where any of these appear in both files, they must be identical. The size of the JAR must be the size that appears in MIDlet-Jar-Size in the JAD.

    The reason is: normally, the device downloads the JAD (from a webserver) first. The information (name, version, vendor, size) is displayed to the user. If the user confirms, the JAR is downloaded. Size and manifest values are compared, to make sure that the JAR it downloaded is exactly what the JAD said it would be.

    Also: a device may refuse to install an application if it is already installed. An application is "the same as" an installed one if the MIDlet-Name, MIDlet-Vendor and MIDlet-Version match. When testing, make sure you delete old versions before installing new ones.

    Some devices will reject applications if the JAD or manifest refer to features that the device does not have. For example, if MicroEdition-Profile specifies MIDP-2.0 and the device supports only MIDP-1.0. (Note that MIDP and CLDC versions are backward-compatible, so all MIDP-2.0 devices are automatically MIDP-1.0 devices as well.)

    An application's code can refer to API classes that the device does not have. This will not usually prevent installation. (Of course, it might prevent the application from running.) For example: it is possible on most devices to detect the available APIs at run time, and load only the appropriate application classes. If an application does not install, it is not because you are using unsupported APIs in your code.
    Once again, great info, grahamhughes! Things are much more clearer now :-)

    Thanks ! :-)

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

    Thumbs up Re: N80 J2me intallation failure.

    Hi,
    Just remove the all optional one and check..it must run like perfect..Then just keep on adding the params one by one.
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Acessing voice channel using J2ME
    By diegomello in forum VoIP
    Replies: 1
    Last Post: 2008-10-21, 15:57
  2. Porting BlackBerry: Carbide & J2ME Comparison.
    By skynetchris in forum Symbian
    Replies: 0
    Last Post: 2008-05-22, 07:09
  3. Nokia N80 / J2ME problems
    By o66183 in forum Mobile Java General
    Replies: 18
    Last Post: 2008-05-09, 12:18
  4. Can J2ME be used for sending MMS Message ?
    By seno_ap in forum Mobile Java General
    Replies: 1
    Last Post: 2006-11-24, 14:36
  5. Remote/On Device Debugging J2ME Application on N80
    By thunder7553 in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2006-06-06, 00:27

Posting Permissions

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