javajava-menokiamidpj2mepolish

nokia error code 217 - jar manifest end of line


I have developed a J2ME application with J2ME Polish. Nokia now validate contents that will be submitted to the store, the challenge is that during validation of my JAR and JAD files, I get Error 217 - The JAR manifest does not end with a new line

I checked my JAR manifest and finds out that it is ending with a new line. Is anyone having any suggestions or solutions?


Solution

  • Double check that there are no invisible characters like whitespace or tab at the last line of the manifest.

    If manifest has a newline indeed, error message apparently means a bug in this Nokia device.

    Still, it is possible that your manifest has something wrong and that Nokia only used incorrect message to indicate some other problem in it. Getting messages like this, make sure that your manifest conforms to respective sections of JAR file Specification (available online), particularly:

    First I'd check is that manifest lines do not exceed "72 bytes (not characters), in its UTF8-encoded form".

    Another thing worth trying is to experiment with various styles of line endings of those specified: CR LF | LF | CR. In your IDE / build there could be a setting to manage that, look for something called like "DOS / Unix / Mac line breaks". Specification states that all these are OK, but you better account for a chance of bug in the device not being able to recognize particular style line breaks.

    Also consider checking / asking at Nokia forums for this might be a known issue with particular device.