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
danielnovy
Posts: 6
Registered: ‎08-18-2009
My Device: Not Specified

RecordStore is lost when override application

We (www.mobilebroker.com.br) have an application that has the hability to upgrade itself

when there is a new version available. It does so by calling a new installer (web-browsing

a JAD file) and overriden the pre-existent application with the new version.

 

In ALL phone models, the previous Midlet RecordStore is preserved so that the new version

does not need to be configured again. BUT in blackberry devices the Midlet RecordStore

is lost! Is there any way where we can keep the RecordStore intact when overriding an

application?

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,434
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: RecordStore is lost when override application

Has anything described in this article changed?

 

Support - RMS Record store does not persist after a MIDlet has been upgraded
Article Number: DB-00095

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/801083/Support...

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
Please use plain text.
New Developer
danielnovy
Posts: 6
Registered: ‎08-18-2009
My Device: Not Specified

Re: RecordStore is lost when override application

Hi MSohm and thanks for the reply!

 

The big problem here is that even if the MIDlet-Name and MIDlet-Vendor is the same

(which is our case) the RMS Record Store is still lost! So, problem persists. We have

a lot of customers who are very unhappy with that issue that happens only in Blackberries...

 

Daniel Novy

Please use plain text.
Administrator
MSohm
Posts: 14,434
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: RecordStore is lost when override application

What BlackBerry Smartphone model and BlackBerry handheld software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.  What authentication mode is being used when creating the RecordStore (RecordStore.AUTHMODE_ANY or RecordStore.AUTHMODE_PRIVATE)?
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
Please use plain text.
New Developer
danielnovy
Posts: 6
Registered: ‎08-18-2009
My Device: Not Specified

Re: RecordStore is lost when override application

AFAIK, it happens on all blackberry devices. I use a 8100 (4.2.0.67) and it has this issue. If this is

really necessary, I can call all my customers and get the Blackberry devices they're using.

 

We use AUTHMODE_PRIVATE. We already tried to change the authmode to AUTHMODE_ANY

trying to fix this problem, but it didn't work.

 

Just so you know: to perform the update, we call platformRequest(update address) inside the MIDlet

and destroy the MIDlet after the call. We thought the problem could be related to the platformRequest.

So, instead of calling platformRequest, we just update the version browsing the JAD address and

reinstalling the *same* app but the problem persisted.

Please use plain text.
Administrator
MSohm
Posts: 14,434
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: RecordStore is lost when override application

Are you seeing this with your application when using BlackBerry handheld software version 4.5.0 or higher?  Can you post some sample code of your RMS implementation.  Does this happen in the BlackBerry device simulator as well, or just on a real BlackBerry smartphone?
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
Please use plain text.
New Developer
danielnovy
Posts: 6
Registered: ‎08-18-2009
My Device: Not Specified

Re: RecordStore is lost when override application

M Sohm, just tested it now on a 8350i Device Simulator (4.6.1.79) and the problem is still there.

So, I presume that the problem would happen on a real device as well...

 

I could post my RMS implementation, but I really cannot see how that would help since it works

on ALL phone models but blackberries. Anyway, code is below. When a new version is installed,

the load method below ALWAYS returns RET_CODE_NO_DATA.

 

    public int load() {
        RecordStore rs = null;
        try {
            rs = RecordStore.openRecordStore(RECORD_NAME, true);
        } catch (RecordStoreFullException rsfe) {
            return RET_CODE_MISSING_SPACE;
        } catch (RecordStoreNotFoundException rsnfe) {
            return RET_CODE_NOT_FOUND;
        } catch (RecordStoreException rsnfe) {
            return RET_CODE_UNKNOWN;
        }

        try {
            if (rs.getNumRecords() == 0) {
                rs.closeRecordStore();
                return RET_CODE_NO_DATA;
            }
        } catch (Exception e) {
            e.printStackTrace();
            try {
                rs.closeRecordStore();
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            return RET_CODE_UNKNOWN;
        }
 

Please use plain text.
New Developer
jsimonelis
Posts: 2
Registered: ‎11-13-2009
My Device: Not Specified

Re: RecordStore is lost when override application

 


I am having the same issue..

 

What is the resolution??

Please use plain text.
New Developer
danielnovy
Posts: 6
Registered: ‎08-18-2009
My Device: Not Specified

Re: RecordStore is lost when override application

My friend, I found NO solution for this problem. But we did find a work around: instead of keeping information on the RecordSet, we modified our app to store the information on our server instead of storing it in the device. We could not wait for an answer from BB team since our clients were VERY UNHAPPY with that issue...

Please use plain text.
Administrator
MSohm
Posts: 14,434
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: RecordStore is lost when override application

Are you seeing your record store removed no matter how the application was upgraded or does the behaviour change based on the method used to upgrade the application (i.e. Desktop Manager, Browser OTA, etc...)?  What methods are triggering the data loss?  Are you able to reproduce this with the rmsdemo included with the BlackBerry JDE / BlackBerry Java Plug-in for Eclipse?

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
Please use plain text.