Friday, January 14, 2011
IOException with RecordStoreNotOpenException on RmsStorage.save() after RmsStorage.deleteAll()
If you see java.io.IOException caused by javax.microedition.rms.RecordStoreNotOpenException thrown while executing a save() in your J2ME Polish app, running for example in the Java ME emulator or also on real devices (BlackBerry, etc.), then you may be encountering the following problem. Check if you have called deleteAll() previously. RmsStorage (improperly, it seems) closes out the underlying record store when it performs a deleteAll(), so that subsequent calls to save() do not work. If you do want to use deleteAll() to clear an old RmsStorage instance, the only solution I know of is to use a different instance after clearing the old one.
Labels:
BlackBerry,
deleteAll,
deleteAll(),
edition,
IOException,
J2ME,
Java,
javame,
ME,
micro,
mobile,
Polish,
RecordStore,
RecordStoreNotOpenException,
RmsStorage,
save,
save(),
Windows
Subscribe to:
Post Comments (Atom)
Copyright 2011 by William Cain
No comments:
Post a Comment