BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-12-2008, 04:31 AM   #1
filli2008
New Member
 
Join Date: Sep 2008
Model: 8800
PIN: N/A
Carrier: AA
Posts: 2
Default Problems with OTA method and BlackBerry

Please Login to Remove!

Hello everyone,

I have developed a J2ME MIDlet program which can run on the mobile phone. Now, I want to run it on the BlackBerry.
When I try to use the .jar file, I obtained next error: “907, Invalid JAR”. Well, I have been testing the program in others mobiles ant it works correctly, but is not possible when I try with BlackBerry.
The jar file weight 149 Kb

I tried to use the RAPC compiler to change the files .jad and .jar to .cod format. However I find again that it does not work, I obtained next error: “907 Invalid COD HTTP Error 406: Not Acceptable”
I have three cod files, and the contents of JAD file is:

MIDlet-Vendor: Filli
MIDlet-Version: 0.0.1
Manifest-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
MIDlet-Icon: /pico.png
MIDlet-1: Mid, /pico.png, z.game.NewGame.MIDlet
MIDlet-Name: Mid
RIM-COD-Size: 60524
RIM-COD-Size-1: 78388
RIM-COD-Size-2: 86764
RIM-COD-URL: NewGame.cod
RIM-COD-URL-1: NewGame-1.cod
RIM-COD-URL-2: NewGame-2.cod
pw_cu: BlackBerry8800
MIDlet-Data-Size: 2000
build_number: 5

What can I do?

I hope you can help me in any way, because it's driving me nuts.
I thank you all in advance.

ps: sorry for any kind of language failures.
Offline  
Old 09-12-2008, 06:17 AM   #2
holy3daps
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Default

Hi!

Since you mention OTA, I'm assuming you're trying to download the application onto your BlackBerry by entering a URL into a browser that points to your JAD file (i.e., you've launched a browser on your BlackBerry, and you entered a URL into it that looks something like: http://www.mywebserver/blackberry/myapp/MyApp.jad).

So my first question is: which browser application on the BlackBerry are you using?

The reason I asked which browser you're using is that sometimes using the carrier-specific browser (Media.Net for AT&T devices, etc.) with COD/JAR modules that are > 64K will cause failure in the download process. Only the RIM browser seems to consistently download large-size (> 64K) applications.

Another issue that may be problematic for you: if the contents of your JAD file are only what's listed above, you are missing the SHA1 signatures of the COD files, and that's probably what's causing the "907 Invalid COD HTTP Error 406: Not Acceptable" response. There should be a line that looks like:

RIM-COD-SHA1: 12 34 56 78 9a bc de f0 19 2a 3b 4c 5d 6e 7f 80 aa bb cc dd

where the 20 hexadecimal pairs are the SHA-1 hash of the module. There should be one line like this for each COD file in the JAD.

If you split up the JAR file into its component .class files in their hierarchy, you can use the RAPC compiler to stitch them back together. I would also rename the original JAD file so that the RAPC compiler is forced to produce a completely new one, and then you can add the other things to the new JAD file from the old one that RAPC missed out on (things like the icon, etc.).

Note: All of the parts of the "assumption" I've mentioned above should really be answered ahead of time in your post - the more information you provide up front (model number, OS version, carrier, APN settings, etc., as well as the precise steps you followed and the results/response at each step) the quicker your question can get answered. With BlackBerry development - especially what amounts to effectively cross-platform (J2ME vs. BlackBerry Java) - there are a lot of different ways things can go wrong, and those of us out here in the aether can make better guesses as to what's happening the more information you give us.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 09-12-2008, 06:29 AM   #3
holy3daps
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Default

Hi!

Just caught this one from simon.hain in another post ("Trouble with installing application on my BlackBerry (907 invalid COD)"): Livelink - Redirection


RIM lists a variety of possible causes that you may want to review.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 09-23-2008, 11:17 AM   #4
filli2008
New Member
 
Join Date: Sep 2008
Model: 8800
PIN: N/A
Carrier: AA
Posts: 2
Default Problems with OTA method and BlackBerry

Hi!

Thanks a lot, now I haven't got any problem with the download and installation. At first time, I can install the program, but when I try playing it, I get the next error:

Error Starting Game_Filli: Module "Game_Filli-2" has verification error 1758 at offset 545a

This is the content of JAD file:

MIDlet-Vendor: Filli
Manifest-Version: 1.0
MIDlet-Name: Game_Filli
MIDlet-Version: 0.0.1
MIDlet-Icon: /zico.png
MIDlet-1: Game_Filli, /pico.png, z.game.NewGame.MIDlet
MIDlet-Jar-URL: Game_Filli.jar
MicroEdition-Configuration: CLDC-1.1
RIM-COD-Creation-Time: 1221224242
RIM-COD-Module-Dependencies: net_rim_cldc
RIM-COD-Module-Name: Game_Filli
RIM-COD-SHA1: da dd 1b 51 fa b9 9e a6 ff 42 d5 e4 77 63 c3 b6 d8 85 c2 72
RIM-COD-SHA1-1: 92 35 25 a6 f1 a6 4d ba ce ad 85 e8 a6 2b d1 f0 c0 3f 88 0e
RIM-COD-SHA1-2: 78 c1 ff d1 47 6e 79 4d 61 1c b6 48 77 0a 2d e8 fd f7 91 83
RIM-COD-Size-1: 55716
RIM-COD-Size-2: 85600
RIM-COD-Size: 83020
RIM-COD-URL: Game_Filli.cod
RIM-COD-URL-1: Game_Filli-1.cod
RIM-COD-URL-2: Game_Filli-2.cod
MicroEdition-Profile: MIDP-2.0
build_number: 5

The previous problem was that I was using a not correct JDE version, before I was using JDE 4.5.0 and now I am using 4.2.0 because the operative system blackberry is laster than 4.2.

What can I do with the current problem? I make next steps:

1.- Obtain Jar and Jad files with ant program (antenna).
2.- Aply rapc (JDE4.2.0) to the jar and jad files and I obtain the news Cod and Jad files.
3.- Unzip COD using WinZip and I obtain three new cod files (I do it in other directory)
4.- I download and install the game with OTA mode and then the installation is successful.
5. When I try to play I get the previous error.

Thank for your attention and information.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


ESI ELECTRO SCIENTIFIC Industries Impedance Meter 252 picture

ESI ELECTRO SCIENTIFIC Industries Impedance Meter 252

$100.00



ESI, Impedance Bridge, 250DE, Electro Scientific Industries, Powers On, picture

ESI, Impedance Bridge, 250DE, Electro Scientific Industries, Powers On,

$79.99



Zareba 2 Mile AC Powered Low Impedance Charger with  Fence Tester picture

Zareba 2 Mile AC Powered Low Impedance Charger with Fence Tester

$39.99



Simpson 2785 Impedance Bridge  picture

Simpson 2785 Impedance Bridge

$125.00



BAS-Zahner  Amos IM6e Impedance measurement unit picture

BAS-Zahner Amos IM6e Impedance measurement unit

$432.81



Digital Ohmmeter LCD Audio Impedance Test Meter Speaker Voice Resistor System picture

Digital Ohmmeter LCD Audio Impedance Test Meter Speaker Voice Resistor System

$83.60







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.