I need the RecordStore.listRecordStores() method because my application may have a number of recordStores.
With Sun One Studio the Linux version of 'Nokia Series 40 MIDP Concept SDK Beta 0.3' rms method RecordStore.listRecordStores() seems to return null even a new recordStore has been created just a moment before. SUN J2ME Wireless Toolkit 1.0.4_01 doesn't have the same problem. I haven't tested the real phone nor other emulators.
The Nokia Series 40 MIDP problem can be seen with the following code :
try {
RecordStore nameDB = RecordStore.openRecordStore(nameRecordStore, true);
nameDB.closeRecordStore();
String[] allRecordStoreIds = RecordStore.listRecordStores();
if (allRecordStoreIds == null) {
System.out.println(" Null list of recordstores ???");
}
} catch (RecordStoreNotFoundException e) {
System.out.println(" RecordStoreNotFoundException " + e);
} catch (RecordStoreNotOpenException e) {
System.out.println(" RecordStoreNotOpenException " + e);
} catch (RecordStoreException e) {
System.out.println(" RecordStoreException " + e);
}
From the Linux file manager I can see that the file run_by_class_storage_name#Record#Store.db has been created.
Has anybody any ideas how to fix or circumvent the problem ?

Reply With Quote

