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

Java Development

Reply
New Developer
KaushalPanjwani
Posts: 28
Registered: ‎07-17-2008
My Device: Not Specified
Accepted Solution

OTA Deployment : Multiple COD in a Single JAD : NullPointer Exception

Hi All,

 

I am trying to install application OTA. I have successfully installed for single COD by modifying JAD to point to the server URL. However in my application there are several COD files and I want them all to be installed once. So based on knowledge Base Article I added

 

RIM-COD-URL-n: <<URL>>

RIM-COD-Size-n: <<size>>

 

for all COD files in single JAD. Since I am using signed code I updated size param with the new cod file size also.

 

When I point to this JAD file URL I get HTTP 500 error and Details shows it to be java.lang.NullPointerException.

Also I added dependency of all project into  RIM-COD-Module-Dependencies, though I ve tried without changing it as well.

 

Here is my complete JAD file ..let me know if I have missed anything..

 

Manifest-Version: 1.0 RIM-COD-Module-Name: SosAlert RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_locationapi,Objects,ApplicationServices,net_rim_xml MIDlet-Jar-Size: 2071 MIDlet-1: ,, RIM-COD-Creation-Time: 1216305305 MIDlet-Jar-URL: SosAlert.jar RIM-COD-URL-1: http://serverip/temp/ExternalJarsLib.cod RIM-COD-Size-1: 33904 RIM-COD-URL-2: http://serverip/temp/Objects.cod RIM-COD-Size-2: 6840 RIM-COD-URL-3: http://serverip/temp/ApplicationServices.cod RIM-COD-Size-3: 4536 RIM-COD-URL: http://serverip/temp/SosAlert.cod RIM-COD-Size: 3716 MicroEdition-Configuration: CLDC-1.1 MIDlet-Version: 0.0 MIDlet-Name: SosAlert MIDlet-Vendor: <unknown> MicroEdition-Profile: MIDP-2.0 RIM-MIDlet-Flags-1: 0

 

 

Thanks in adavance.

 

Developer
kzettel
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: OTA Deployment : Multiple COD in a Single JAD : NullPointer Exception

You should not have to list your individial modules in the RIM-COD-Module-Dependencies section.  Here are a couple questions that might help:

 

1.  Are any of your cod files actually multiple cods (rename to the app.cod to app.zip and try to extract).  If they are each extracted cod should be listed as separate RIM-COD-URL/Size-N in the jad.

 

2.  Is your server setup with the correct mime types?  The mime type for a jad should be text/vnd.sun.j2me.app-descriptor and the mime type for cod should be application/vnd.rim.cod

 

3.  After you get the NullPointerException check your event log by going to the home screen and pressing Alt-LGLG.  There may be an entry in bold that relates to the NullPointerException and has a stack trace.  This may give us some insight as to why this is happening.

 

4.  Try it on the simulator and see if the simulator's output has anything relevant. 

 

Also let us know which jde you are building with and which OS/device model you are using when you get these errors.

Kurt Zettel | Chief Architect | Metova
www.metova.com
New Developer
EricGiguere
Posts: 5
Registered: ‎07-17-2008
My Device: Not Specified

Re: OTA Deployment : Multiple COD in a Single JAD : NullPointer Exception

Don't use the full HTTP path in the JAD, they're relative, so just put the names of the .cod files, i.e.:

 

MIDlet-Version: 1.0.0

MIDlet-Name: My Silly App

MIDlet-Description: Wish it would do something
MIDlet-Vendor: RIM Should Buy Us For Big Bucks, Inc.

RIM-COD-URL-1: library1.cod
RIM-COD-Size-1: 15088
RIM-COD-URL-2: library2.cod
RIM-COD-Size-2: 7963

RIM-COD-URL-3: sillyapp.cod
RIM-COD-Size-3: 41923

 

That's a minimal JAD file for BlackBerry OTA that involves 3 separate modules.

 

Just make sure the JAD file and the COD files are all in the same folder and everything will work fine, all that's needed is the HTTP URL to the JAD file. Be sure also to list the COD files in reverse order of dependency, i.e. so the dependent ones are loaded first. And keep them each under 65536 bytes in size.

 

I'll be posting a longer description of OTA on my site soon. 

New Developer
KaushalPanjwani
Posts: 28
Registered: ‎07-17-2008
My Device: Not Specified

Re: OTA Deployment : Multiple COD in a Single JAD : NullPointer Exception

Thanks for the info.

 

Actually mistake was from our side, we had written wrong MIME type for JAD file download.