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
Highlighted
Contributor
Posts: 22
Registered: ‎06-02-2010
My Device: 8330
My Carrier: Rogers & Bell
Accepted Solution

javaloader stops working ?

[ Edited ]

I was able to use Javaloader fine up untill I added some more classes to my project then suddenly the Javaloader aborts at  72432 bytes of  100178

 

The command line I am using :

javaloader -usb load C:\javaworkspace\MyProject\MyProject.cod

 

and reports :

 

RIM Wireless Handheld Java Loader
Copyright 2001-2007 Research In Motion Limited
Connecting to device...
Connected                 **
Loading MyProject                         Error: file is incompatible with data stored on the device
0 bytes sent at ~0 bps
Disconnected
'#javaloader' is not recognized as an internal or external command, operable program or batch file.

 

Also my application uses persistant store, I added some new properties to the persistant store between updates, could this have caused this problem?

 

What is happening?

 

 

Contributor
Posts: 22
Registered: ‎06-02-2010
My Device: 8330
My Carrier: Rogers & Bell

Re: javaloader stops working ?

I solved it myself though trial and error.

 

 

I had to change the GUID for this line

 

PersistentObject po = PersistentStore.getPersistentObject(ClientProfile.PERSISTENCE_GUID);

 

Not elegant because I leave old data on the device.

BlackBerry Development Advisor
Posts: 15,263
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: javaloader stops working ?

This is caused by changing your persistent class (adding or removing members from it).  You'll need to delete the application before installing the new version.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Contributor
Posts: 22
Registered: ‎06-02-2010
My Device: 8330
My Carrier: Rogers & Bell

Re: javaloader stops working ?

[ Edited ]

Although this corrected the issue on my device, what will happen when I release this update to the customers? Will the update of the app do this automatically or will have need to tell customers to delete the app before re-downloading the new version?

 

 

BlackBerry Development Advisor
Posts: 15,263
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: javaloader stops working ?

If you have updated your persistent class, users will need to uninstall before installing the new version.

 

Another way to handle this is to keep both versions of your persistent classes in your application, changing the name and or package of the new version.  Your application can then be upgraded.  It would then be up to your application to detect the class saved in persistent store (version 1 or 2), copy the data to the new class and save it over top of your old data.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker