After the update of the app, can not read the store persistent on some devices

Hello

I have a problem in an application I was able to reproduce in a simple test application.

The test application writes some info in the persistent store, then can read back and it seems to work fine.

If I change the version number of the application, then download the new version (by downloading a jad file in the browser), he invites me to replace the old version w / the new version, which I confirmed. After you download the new version of the app, he invites me to reboot the device, what I'm doing.

On most of the devices I tested this, after the reboot, when I run the app update, it works as expected - it can read the value written in the store persistent by the earlier version of the application.

However, on some devices, it is unable to do.

Debugging a bit, the error occurs when you try to get the object persistent via:

PersistentObject po1 = PersistentStore.getPersistentObject(MY_KEY);

This survey line an exception - exception message is simply 'null '. I don't know what is precisely the type of exception since it is a static method should not throw any exception that as far as I know, so I'm just catching a generic java.lang.Exception.

The same - in the version update of the application, if the software tries to write to the store persistent by using the ID of the object, the result is the same - the call to getPersistentObject throws an exception "null".

Note that I'm not changing anything this either on the object that is saved in the persistent store, and I'm not changing the identifier of object between the versions of the application.

A device on which I can reproduce this issue systematically is a Blackberry 9800 (Torch) running 6.0 Bundle 2647.

Any advice or suggestions how to debug this appreciated.

I tried to reproduce this on a Blackberry 9800 (Torch) running 6.0 Bundle 2647, identical to what noted you above but find the code example you posted worked well.  Were there other changes between the versions other than increment the version number?

Is - what happens on multiple devices or just one?  If it is just a device you can try to reload the software of the device in case anything is damaged.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for