lwuit exception on blackberry - blackberry

"uncaught exception thrown in midlet constructor: userclasses.MainMIDlet" while trying to run lwuit application on blackberry mobile device. I am developing with netbeans+lwuit+resource editor.

My issue was .cod file. from the solutions I got online, I had to extract .cod siblings from the main .cod file generated and copied them with .jad that contains their name reference into thesame folder on the device. after I ran the jad file and it installed cod files. and the application is working fine now.

Related

Submitted .cod files on BlackBerry app world has error (...attempts to acces a secure API)

We submit a .zip file on Blackberry app world for publishing. But they return it because they said that there is an error: Error starting MyApp: Module 'MyApp' attempts to access a secure API. I searched about this error and it all said that this error will appear if my app is not sign. But we are sure that is is signed because we sign it before building and submitting it to the Testers. What could be wrong? Another thing we use the .jad to install it on the devices, and if we open the .jad we could see all the signing there. Is it possible that the signing just happens on the .jad and not on the .cod files?
It turns out that having large sizes of .cod or the last .cod having 64kb and up in size causes the problem. I found some posts on Blackberry developers forum saying that when you have .cod like this, when you install the app via OTA and you use mobile network, some network truncates the .cod thus removing the signature. The solution for this problem is to add an image(approximately 10kb) on res and rebuild the application so that the an extra cod could be created and the sizes of other cods would be lessen. My cods that I submitted having this problem has 86kb and the last cod is 63kb, I added a 10kb image and rebuild the application. New cod was added and the sizes of other cods lessen. The size of my maximum cod is just 74kb, and the newly created cod is 25kb. This is the set of cods which was published successfully on app world.
References:
First link
Second link
Third link

Error importing File in Blackberry Desktop Software

I have developed an application for Blackberry and am trying to import the cod file into my device using BlackBerry Desktop Manager. I try to import the .COD file. The application was installed earlier on this BlackBerry. When I try to use the Import option I get the error message saying -
"There was an error importing files. No additional applications can
be found. Your file might contain applications that already exist in
the application list, are not compatible for your device, or have
errors."
I changed the Version filed in BlackBerry_App_Descriptor.xml and then signed the deploy-able. Don't get the message any more.

Packaging a BlackBerry App for Release

I'm currently using the BB Plugin for Eclipse and am trying to generate a package without any .debug files and only one .cod and one .jad file to send to a client.
I'm a bit stuck on how to do this, I can't find a 'release build' setting and am having trouble finding any documentation on how to accomplish this or if I'm even on the right track.
Right click over your project, select "BlackBerry -> Package Project(s)"
In case it doesn't sign automatically, right click again, "BlackBerry -> Sign with signature tool"
Look for the generated "deliverables" folder in your project package explorer, then select the files for OTA deployment (inside "Web" folder). There you'll find one or more sibling cods and the correct jad descriptor.
profit
For OTA installation:
1. unzip your COD file.
2. now you got number of cod files like xyz.COD, xyz-1.COD, xyz-2.COD ... etc.
3. open your .jad file and verify listed .COD fils are mentioned in .jad file or not
4. upload all .COD files and .jad file in same location on web
5. open the .jad location on mobile device
Note: If your .jad file having incorrect .COD listed or still getting error then first delete your .jad file and .COD file and clean your project and then rebuild your project then follow above steps.
First of all sign the application, after signing it upload the project on to your server and after uploading it take the .jad file and make a link of the path of the project where it is uploaded and then give that to the client and then he can download the application from there and can install it.
When we sign Blackberry Application successfully we can able to install that app in device and also able to upload to our Server or Blackberry App world. we have just need .cod & .jar file to upload in BB app world as well as in device . you r going on the right way .. Go ahead .

Blackberry compatibility issue

i developed a simple uiapplication on 4.2.1 with a screen...if i compile it using 4.2.1 and run on 9500 simulator it goes to compatibility mode...i don't want this so this is what i tried.....edited the jad file added
RIM-TouchCompatibilityMode: false
RIM-TouchCompatibilityMode-UserChangeable: true
added the jad file to the project and compiled to create a new cod file...
cleaned the 4.7 (9500) simulator ...then loaded the application to simulator
File -> Load java program - > helloworld.cod
then ran the program...still compatibility mode....what am i doing wrong here...please let me know..
When you load an app into the simulator it just loads the bytes from the COD file and does not look at the JAD - so it doesn't see the configuration in the JAD. A couple of ways around this would be:
Put your JAD/COD files on a webserver and install it from the simulator's browser, or
Create a build with the 4.7 or higher JDE
Another way that i found for simulating OTA is by simulating SD card...copying the jad and cod files on the SD card then installing the app by running the jad file...it works...

Blackberry - run a JAD file on the simulator

I have a jad file for a BB app which I want to run on the simulator. When I do a "Load Java Program" it looks for a cod file.
How can I run a JAD file on a BB simulator?
Open the BlackBerry browser, enter the web link to the JAD file in there and your application will be installed on your BlackBerry simulator.
A JAD file is an information file that goes with the COD file that has the software. You should be able to get the COD file from the same place you got the JAD.
I have a jad file for a BB app which I want to run on the simulator. When I do a "Load Java Program" it looks for a cod file.
For anyone using PhoneGap Build who finds they are presented with a .jad file only, but no .cod files, you need to...
look at this file in notepad as it will list the names of all the .cod files you need (maybe 40 to 50 of them)
notice the .jad file was located at http://s3.amazonaws.com/blackberry.phonegap/slicehost-production/apps/123456/YourAppName.jad so change the last bit of your own URL to .cod (or -1.cod and so on) to download the 40+ other files to the same folder
in the simulator, select File > Load and then multi-select all the .cod files together
wait patiently and your app will appear at the bottom of the simulated screen's menu

Resources