0

I am working on mobile application. I have used RMS. When I am saving data in RMS, I am getting RecordStoreFullException error in my mobile application.

How can I overcome this error? I am using NetBeans for developing my J2ME application.

    javax.microedition.rms.RecordStoreFullException
            at net.sourceforge.floggy.persistence.impl.i.a(+79)
            at ...
    javax.microedition.rms.RecordStoreFullException
    total storage space set to minimum: 4000
        at javax.microedition.rms.RecordStore.allocateNewRecordStorage(RecordStore.java:1225)
        at javax.microedition.rms.RecordStore.addRecord(RecordStore.java:768)
        at net.sourceforge.floggy.persistence.impl.i.a(+38)
        at ...

Has anyone faced this problem?

gnat
  • 6,213
  • 108
  • 53
  • 73

1 Answers1

3

Size of the storage can be adjusted in emulator preferences used by your IDE. Check Netbeans help for specific details on how to do that for particulat emulator used in your version Netbeans.

In wireless Toolkit, RMS size settings are available from ktoolbar -> edit -> preferences. As an example, take a look at WTK 2.5.2 User Guide available online, section "4.3.2 Storage Sizes" explains how to do that.

http://docs.oracle.com/cd/E17802_01/products/products/sjwtoolkit/wtk2.5.2/docs/UserGuide-html/figures/emulator-5.jpg

on a further thought...

...think twice before increasing storage size. On a real device, you won't have an option to do that. You may bend emulator to have as much gigabytes storage as you wish, but on a real phone, you won't have such an option.

On a real device, your application will simply fail if it expects RMS to be unlimited. You better design your MIDlet in a way that would allow it to work in a real-life environment.

Community
  • 1
  • 1
gnat
  • 6,213
  • 108
  • 53
  • 73
  • thanks gnat.but after i increased the size also that error coming again –  Jul 05 '12 at 09:27
  • @User1989 your original error message contains `total storage space set to minimum: 4000` - after increase, how does this part look? does it mention new number, other than `4000`? – gnat Jul 05 '12 at 09:34
  • No, Again total storage space set to minimum: 4000 error message is coming –  Jul 05 '12 at 09:36
  • @User1989 in that case I would rather think that config changes didn't propagate properly. One way to test if this is so would be to add _meaningful_ logging to your midlet (like 'number of records processed: 100, 101, 102...`) and re-run it to find out whether it has changed after you reconfigured emulator – gnat Jul 05 '12 at 09:48
  • 1
    thanks gnat for your perfect answer. I have reconfigured the emulator storage size again .now it works well. –  Jul 05 '12 at 12:09
  • @User1989 you are welcome. In case if you're interested, you may take a look at [instructions explaining how does accepting an answer work at Stack Overflow](http://meta.stackexchange.com/a/5235/165773) – gnat Jul 05 '12 at 12:12