Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 11:56, 15 February 2008.

KIJ000805 - RecordStore.AUTHMODE ANY throws NullPointerException

From Forum Nokia Wiki


ID KIJ000805 Creation date January 24, 2008 
Platform S60 2nd Edition   Devices Nokia 6680, Nokia 7610 
Category Java ME  Subcategory MIDP 2.0  

Overview

Using RecordStore.AUTHMODE_ANY throws NullPointerException.

Description

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));
       }
   }

Solution

This problem has been corrected in S60 3rd Edition.

Related Discussions
Thread Thread Starter Forum Replies Last Post
recordstore to list cks Mobile Java General 3 2006-11-28 09:50
data reading di lemma? jump_912 Bluetooth Technology 0 2003-11-26 10:26
Newbie: How to sync MIDP 1.0 RecordStore to PC? davelasker Mobile Java General 3 2005-10-21 09:16
is there a File class equivalent in J2ME? rj_cybersilver Mobile Java General 44 2007-08-18 15:51
Empty recordstore in emulator alicegue Mobile Java Tools & SDKs 0 2005-03-16 03:39
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZKnownIssueQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX