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
Posts: 19
Registered: ‎08-21-2009
My Device: Not Specified

Error when downloading COD file "907 Invalid COD"

Hello,

 

I am having a strange problem downloading an application over the network. 

 

I am using Blackberry Tour (9630) running software version 4.7.1.40.  The application is built using JDE 4.7.0.41.  I am using a standard Blackberry browser to download.

 

First, after it starts the download I get error "JVM error 104" with no additional information. 

Then it displays a dialog with error "907 Invalid COD" with no additional information.

 

The poblem appeared after some new features were added and application size increased from 62.2 to 93k. 

 

The resulting cod file contains two smaller CODs (one 64k the other 29k).  I verified with the network provider and their limit on download size is 2.5MB, however, the increased size appears to be the culprit.

 

We tried extracting sibling CODs from the parent cod and it still does not work.  Interestingly enough, the download works fine on simulators and Blackberry Curve.  It is only the Tour/9630 that is having this issue.

 

Here are the contents of JAD file if it helps.

 

 

=====================================================

Manifest-Version: 1.0
MIDlet-Version: 1.3.0
MIDlet-Jar-Size: 160062
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: pointTrace.jar
RIM-MIDlet-Icon-1-1: res/icons/favicon.png,focused
RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_locationapi,net_rim_bbapi_phone
RIM-COD-URL-1: pointTrace-1.cod
RIM-COD-SHA1-1: 92 fb b8 3a 1b 12 12 e4 7e e5 06 a5 0c 48 6c 52 b4 dc a2 02
RIM-MIDlet-Flags-1: 0
RIM-COD-Size-1: 28944
RIM-COD-Module-Name: pointTrace
RIM-COD-Size: 64868
MIDlet-Name: pointTrace
RIM-COD-Creation-Time: 1251220915
MIDlet-1: pointTrace,res/icons/favicon.png,pointtrace.pointTrace
RIM-COD-URL: pointTrace.cod
MIDlet-Description: pointTrace application with dynamic forms
RIM-COD-SHA1: e4 e1 22 77 59 c0 db 29 9d 03 b5 5b 72 ff b8 39 1c 41 01 e6
MicroEdition-Profile: MIDP-2.0
MIDlet-Vendor: pointTrace
RIM-MIDlet-Icon-Count-1: 1

======================================================

 

I don't have the foggest idea why this is happening and will appreciate any info.

 

Thanks a lot.

 

 

 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Error when downloading COD file "907 Invalid COD"

[ Edited ]

Do the errors occur if you download via the Hotspot (WiFi) Browser (go to the BlackBerry Browser, then change Options -> General Properties -> Default Browser accordingly) and/or the service provider's browser?

 

P.S. Make sure you provide the unpacked CODs instead of the composite COD for download. Check whether  the pointTrace.cod available for the download is the module unpacked from the original pointTrace.cod produced by JDE/Eclipse Plug-in.

Message Edited by klyubin on 08-25-2009 07:37 PM
New Developer
Posts: 19
Registered: ‎08-21-2009
My Device: Not Specified

Re: Error when downloading COD file "907 Invalid COD"

[ Edited ]

"Internet Browser" is the only option available for "Default Browser".  It should be Blackberry default BIS.  This is the only browser istalled.  I am definetely not using WiFi and this phone does not even support it. 

 

The application was built using JDE 4.7.0 rather then Eclipse and we tried both downloading a single cod and extracting sibling cod.  (both methods work fine on curve and simulators but not on tour).

Message Edited by gtSasha on 08-25-2009 02:46 PM
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Error when downloading COD file "907 Invalid COD"

Hm... Interesting. Various things to try:

 

* Check whether the MIME types returned by the web server for COD and JAD files are correct.

 

* Set the Event Log's "Min log level" to DEBUG and see whether anything suspicious is logged when the browser is downloading the app. If I recall correctly, you should also be able to see how many bytes the browser actually downloads.

 

* Check the Event Log after JVM error 104 occurs and also attach the Debugger to the Tour and see whether there's more information on the exception. I believe, JVM Error 104 means that an an uncaught exception occured in one of RIM's own applications: "An uncaught Java exception was thrown in the Java code and diagnosed by the JVM. Execution can be continued or the handheld can be attached to a debugger on a desktop through a serial or USB cable. The event log should contain the traceback of the thrown exception." (http://www.blackberry.com/developers/javaknowledge/general/kpa0307163334.shtml)

 

* Upgrade the OS and see whether the error still persists.

New Developer
Posts: 19
Registered: ‎08-21-2009
My Device: Not Specified

Re: Error when downloading COD file "907 Invalid COD"

[ Edited ]

Thank you klyubin

 

I ran the program with the debugger attached and got some more info. 

 

The error happens in module CodeModuleGroup:  CodeModuleGroup(String) constructor throws IllegalArgumentException

 

According to the documentation it throws this exception when group name length exceed [unspecified] maximum or contains illegal characters.  The group name is "pointTrace".  I doubt that maximum is less then 10 characters and none of the characters are illegal. 

 

May be there are some blackberry developers reading this board and they can provide some insight.

 

I am not sure what log you are talking about.  How can you access it and where do you set the level? 

 

Thanks.

 

Message Edited by gtSasha on 08-25-2009 03:27 PM
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Error when downloading COD file "907 Invalid COD"

Once way to access the system-wide Event Log by going to the BlackBerry home screen (the one with all the icons of various applications, the date, the time, etc.), and then typing four keys "lglg" while holding the left ALT key down (aka ALT + LGLG). The Event Log viewer application should appear in the foreground as a result.

 

A quicker way to access (and archive) the Event Log is to connect the BlackBerry over USB to your PC and then run

  JavaLoader -u eventlog >bb.log

You'll get the full dump of the Event Log into the text file bb.log.

 

You may want to submit this issue to the BlackBerry Developer Issue Tracker (http://na.blackberry.com/eng/developers/resources/issuetracker/).

 

P.S. Try shortening the "description" metadata field of your application -- who knows, it might help...

Highlighted
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Error when downloading COD file "907 Invalid COD"

[ Edited ]

One more thing to try:

 

* Try removing unnecessary lines from the JAD file. Leave only the following entries: Manifest-Version, MIDlet-Name, MIDlet-Version, MIDlet-Description, MIDlet-Vendor, MIDlet-Jar-URL, MIDlet-Jar-Size, RIM-COD-Module-Name, RIM-COD-Module-Dependencies, RIM-COD-Creation-Time, MicroEdition-Configuration, MicroEdition-Profile, RIM-COD-URL*, RIM-COD-Size*.

Message Edited by klyubin on 08-25-2009 08:53 PM