Revision as of 08:45, 28 June 2012 by hamishwillee (Talk | contribs)

Archived:RecordStore.AUTHMODE ANY throws NullPointerException on S60 2nd Edition (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): Nokia 6680, Nokia 7610
Created: User:Technical writer 1 (24 Jan 2008)
Last edited: hamishwillee (28 Jun 2012)



Using RecordStore.AUTHMODE_ANY in S60 2nd Edition devices throws NullPointerException.


After a RecordStore has been created and the MIDlet tries to set the authorization mode to RecordStore.AUTHMODE_ANY, which defines that other MIDlet suites can have access to the record store, NullPointerException will be thrown. RecordStore.AUTHMODE_PRIVATE defines that only the MIDlet suite which has created the record store can access it.

How to reproduce

The problem can be reproduced with two RecordStore methods, openRecordStore() and setMode().

The following example uses the openRecordStore() method:

RecordStore store;
try {
store = RecordStore.openRecordStore("TestStore", true, RecordStore.AUTHMODE_ANY, true);
if (store!=null)
display.setCurrent(new TextBox("New database", "Database created", 100, TextField.ANY))
catch (Exception exception) {
display.setCurrent(new TextBox("Failure", exception.toString(), 100, TextField.ANY));


This problem has been corrected in S60 3rd Edition.

46 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.