views:

157

answers:

0

Hello,

I am currently doing a bit of j2me development and I am using the Samsung SDK as the emulator. The problem I am having is to do with RecordStores (RMS). At first everything was working fine and I could create/delete/edit RecordStores as I wanted. Now, for some reason whenever I try to create a new RecordStore, I get the following error in my Console "Could not open listen socket[name]" (where name is the record store name I want to open/create).

The odd thing is it only prints the message I have stated. I thought that it was being caught in an exception somewhere so I tried the good old System.out.println statements in all of the catches that I have in the code but it doesn't seem to be getting caught anywhere which I find odd. Even though it finds this, it lets me continue and when I call the readRecords() method (basically goes through the RecordStore and prints all of the records to the console) it will show me all the data I have added to the recordStore, but when I turn off the emulator and start it back up, that record store isn't there and this is what is confusing me. I don't know what I have done to make it stop working.

This is the method I call to create/open a record store:

openRecStore(String RecordStoreName);

This is the method it calls:

public void openRecStore(String string1)

{

  newString = string1;
try
{
  // The second parameter indicates that the record store
         // should be created if it does not exist
  //rs = RecordStore.openRecordStore(REC_STORE, true);

  rs = RecordStore.openRecordStore(newString, true);
}
catch (Exception e)
{
  db(e.toString());
  // error checking
  System.out.println("14");
}

}

private void db(String str)

{

 System.err.println("Msg: " + str);

}

I thought the problem was here but it doesn't print the System.out.println message.

Does anyone know what this error means or how I can solve it?