Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

907 Invalid Jar Error when installing an application wirelessly

by Retired ‎02-16-2010 01:24 PM - edited ‎02-19-2010 01:53 PM (44,517 Views)

Summary


This article applies to the following:

  • BlackBerry® smartphones based on Java® technology
  • SDR161332


Problem


When you attempt to install an application wirelessly with the BlackBerry® Browser, Internet Browser, or WAP Browser, the installation fails and the following error appears:

907: Invalid Jar


Cause 1


The COD file is corrupt.


Resolution


Rebuild the application and place a new copy of the COD file on the web server.


Cause 2


The RIM-COD-SHA1, RIM-COD-Size, MIDlet-Jar-Size, or MIDlet-Jar-URL parameters specified in the JAD file are missing or incorrect.


Resolution


BlackBerry Device Software 4.1 verifies the parameters listed in the JAD file are correct. Update the JAD file with the correct values from the JAD file that is created by the BlackBerry® Java® Development Environment (BlackBerry JDE). These values may change each time an application is modified and rebuilt.


Note: If COD files are used, the JAR file does not have to be placed on the web server; however, the MIDlet-Jar-URL must be present.


Cause 3


You have installed a large application with the WAP Browser.


Resolution


Many wireless service providers place restrictions on the size of files that can be downloaded with their WAP gateway. Files with a size greater than the maximum limit are truncated, corrupting the COD file.


Contact your wireless service provider to verify the maximum file size that can be downloaded or install the application with the BlackBerry Browser or Internet Browser.


Cause 4


You have attempted to install a COD file that contains sibling COD files using the WAP Browser.

If an application contains more than 64 KB of data in the application or data space, it is divided into multiple COD files known as sibling COD files. These sibling COD files are then packaged in a parent COD file that is a zip archive with the COD extension.


Note: The WAP Browser does not support the installation of a COD file that contains sibling COD files.


Resolution


There are two possible resolutions to this issue:

  1. Install the application using the BlackBerry Browser or the Internet Browser.

    Note: The Internet Browser does not support COD files larger than 512 KB.

    OR

  2. Extract the sibling COD files from the parent COD file using an application such as WinZip®. Place each sibling COD file on your web server and reference each one in the JAD file. When using this configuration, each COD file is downloaded separately.

    Note: The first sibling COD file has the same name as the parent COD file; therefore, it must be extracted to a different directory or else it could overwrite itself.

Cause 5

The browser is unable to locate COD files listed in the JAD file. The locations or URLs of the COD files are specified in the RIM-COD-URL parameters of a JAD file.

Note: This is often followed by a 404 error.


Resolution


Verify the URLs specified in the RIM-COD-URL parameters are valid.


Note: If the application is too large to be contained in a single COD file, the JAD file created with BlackBerry JDE 4.1 contains parameters for all sibling COD files instead of the parent COD file, which is not the case in previous BlackBerry JDE versions. You need to extract the sibling COD files from the parent COD file and place them on your web server. The parent COD file is a zip archive, which can be opened and extracted using an archive tool such as WinZip. The first sibling COD file has the same name as the parent COD file; therefore, it must be extracted to a different directory or else it could overwrite itself.


Cause 6


Certain versions of the BlackBerry Device Software can display the 907 Invalid Jar error when you install an application wirelessly; however, this issue has been resolved.


Note: It existed in some BlackBerry Device Software versions between 4.0.0.171 and 4.0.0.215.


Resolution


Modify the JAD file of the application. Locate the MIDlet-Jar-Size: parameter of the application JAD file, and set this parameter to 0 (zero).


Cause 7


The Multipurpose Internet Mail Extensions (MIME) types for JAD and COD files have not been configured correctly on the web server hosting the application.


Resolution


Configure the web server to handle these file types properly. For more information, see this article.


Cause 8


An application has exceeded the maximum number of preverification stack maps allowed for a specific method.


Resolution


To resolve this issue, see this article.


Cause 9


The filename of a COD file referenced in the JAD file contains multiple periods (for example, my.file.cod).


This is a previously reported issue that has been escalated internally to our development team. No resolution time frame is currently available.


Workaround


Rename the COD file so that it does not contain multiple periods.


Cause 10


You have attempted to install, with the Blackberry Browser (BES/MDS), a COD file that contains sibling COD files but your Browser Identification (user-agent) property is not set to BlackBerry.


The problem is caused when the BlackBerry smartphone's Browser Identification (user-agent) property is set to Netscape, Firefox, or Internet Explorer in BlackBerry Device Software 4.5 and later.


Note: Netscape® emulation mode was changed to Mozilla® Firefox® as of BlackBerry Device Software 4.6.


This is a previously reported issue that has been escalated internally to our development team. No resolution time frame is currently available.


Workaround


To work around this issue on a BlackBerry smartphone, complete the following steps:

  1. Click the Browser icon.
  2. Click Options on the menu.
  3. Click Browser Options.
  4. Click the Browser Identification field.
  5. Click BlackBerry.
  6. Save and exit.

To work around this issue on the computer, complete the following steps:

  1. Extract the sibling COD files from the parent COD file using an application such as WinZip.
  2. Place each sibling COD file on the web server.
  3. Reference each sibling COD in the JAD file.


Contributors
Users Online
Currently online: 31 members 6,252 guests
Please welcome our newest community members: