In the Java application we're developing on Sharp Gx20 terminal, we encountered a problem relating to RMS. The following snippet is where the problem comes from. Because no emulator is availible for the moment and in fact, running on emulator cannot have the real effects, I ran the program on the real device. In order to track down what happens out there, I added a debugForm to hold the helpful informations. In every run instance, the outcome is that an Exception is thrown and recorded in the debugForm. This Exception is of type javax.microedition.rms.RecordStoreFullException with information "nVailible -4". And there is no such "after openRecordStore(CONFIG_RS_NAME, true)" supposed to print at Debug point 2 being printed on the debugForm. This indecates the place where the exception has occured is method openRecordStore() which is the first line of the try- catch-finally block.
Question: Since the method runs at the first time of the every beginning of whole application and there is no RMS operations performed before this, It confused me. Besides this snippet works OK in other devices (Sony Erricson T610, Nokia 7650.). Why it doesnt work here?
I need your help and suggestions. Thank you very much in advance.
[ January 13, 2004: Message edited by: Lion Z. Li ] [ January 13, 2004: Message edited by: Lion Z. Li ]
I do not think this is a good way to debug. The UI update is not likely to be real-time -- the system might decide to re-draw the form *after* the load() method exits. Can you make it to write debug messages to your JVM console?
Hey Micheal, Thanks for your wise thought. Due to some reason I've gotten no emulator of the device I'm debugging on. I just run my program on-device. And I dont know how to take advantages of JVM console under such a circumstance. Do you have any other method to do this kind of debug. Also in my case, I'm really frustrated by the RMS implementation of this device. It just dosn't work no matter how I've been trying to. It says FullStoreException even when i first open a new one. I thought it might have some convention on record store Names, but it turned out there's no. I also thought it might share the whole memory space with Jad,jar file as well as runtime memory consumers(say heap,etc), but the trueth is that my test program works OK both when I swell the Jar file to as big as my working program and when I load bulk of images at runtime. Have you ever met such a tough case? Do you have any clever clue,please. Thanx again,
posted 15 years ago
Would it throw the error if you just create an empty and store and then close it? If this works, you can try RecordStore.getSizeAvailable() method to see if it returns zero. You can also try to buy a $5 mobile game that is known to work on your device (almost all of them use RMS to keep track of scores) and try it. If it fails with the same error, something is wrong with your phone and you can return it. As of debugging, you can write the debugging messages to a buffer string and write the entire string out in form in the catch block.
Hello Lion, In fact RMS is source of trouble on many devices, be prepared to face strange situation with it ... It seems that some devices are looking for the not mandatory field of the jad "MIDlet-Data-Size:". I'm not sure but try to put it in the jad with some value. Hope this helps ! Good luck !
Lion Z. Li
posted 15 years ago
Hey Micheal and Pavlin, Thanks for your replies.
Would it throw the error if you just create an empty and store and then close it? If this works, you can try RecordStore.getSizeAvailable() method to see if it returns zero.
Yes, It throws javax.microedition.rms.RecordStoreFullException even I open a new one at the beginning time of my program. And method getSizeAvailable() is not a class method we cant invoke it if there is no recordstore reference returned. But anyway, your clever test(running a released game midlet) is worth a try i'm gonna try it out. And I also think your BufferString debug mothed fits in my situation. thank you very much Pavlin,
It seems that some devices are looking for the not mandatory field of the jad "MIDlet-Data-Size:".
I'd had no idea about the option Midlet-Data-Size. I just remember it is required when I port my project onto NEC800, giving it a value of 1024 but not understanding what its for.Can you explain this option with more information? In this problem, I tried to give it 1024 too, but it didnot work either. I'm gonna try some more other values and let you know the outcome. Thank you very much
In fact RMS is source of trouble on many devices, be prepared to face strange situation with it ... It seems that some devices are looking for the not mandatory field of the jad "MIDlet-Data-Size:". I'm not sure but try to put it in the jad with some value. Hope this helps !
I had the same problem with a KDDI emulator. Setting MIDlet-Data-Size solved the problem. Thanks for the hint. Christian Wolf
hi, i'm a new member here. I'm facing the exact situation here, but my phone is Nokia 6255. It always returned RecordStoreFullException when i call openRecordStore method, even when i was trying to create an empty recordstore. I've asked this problem in nokia forum but no one replies. Thanks
posted 13 years ago
Oh i almost forgot, i've tried specifying the Midlet-Data-Size in the .jad file and the manifest, but still not giving solution to the problem.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database