J2ME: BlackBerry: ControlledAccessException

J

John Goche

Hello,

I would like to know what could be causing a ControlledAccessException
on the BlackBerry device simulator. This exception is being thrown
only the first time I load the application onto the device simulator
and try to run it. Thereafter I no longer see this exception even
if I do a reset on the device simulator. Has anyone seen this
exception? If so then please let me know.

BTW, is there any way of deleting an application from the
BlackBerry application launcher. I cannot seem to find
a way to do this but if this could be done, I could
delete the application and see if I can
reproduce this exception.

Thanks,

JG
 
D

Darryl L. Pierce

John said:
I would like to know what could be causing a ControlledAccessException
on the BlackBerry device simulator.

Did you read the Javadocs for the exception? They'll give you an idea of why
it would get thrown.
BTW, is there any way of deleting an application from the
BlackBerry application launcher. I cannot seem to find
a way to do this but if this could be done, I could
delete the application and see if I can
reproduce this exception.

Do you mean from the ribbon on the device, or from the emulator? If the
latter, just delete the COD file in your emulator's file system.

--
Darryl L. Pierce <[email protected]>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
 
J

John Goche

Thanks,

I deleted the file:

C:\Program Files\Research In Motion\BlackBerry JDE
4.1.0\simulator\Foo.cod

and closed the emulator. The file was gone from the file system.
Then I loaded the COD file again with a quick recompile and run.

However, I still did not get the ControlledAccessException.
I suspect that the exception was thrown the first time I loaded
the app onto the emulator due to application preferences not
being there. I am still not sure about this.

After deleting the COD file and reloading the app, the
application preferences it had stored on the simulator
persisted on the device. These were created with a
J2ME RecordStore object.

Is there a way to delete the RecordStore with the application?
I thought this was supposed to happen automatically when
the application is gone. How can I do this?

Thanks,

JG
 
D

Darryl L. Pierce

John said:
Is there a way to delete the RecordStore with the application?

RecordStore.deleteRecordStore(String storename)
I thought this was supposed to happen automatically when
the application is gone. How can I do this?

You're dealing with an emulator. They don't always match spec like the
device.

--
Darryl L. Pierce <[email protected]>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
 
J

John Goche

Hi,

I tried calling RecordStore.deleteRecordStore(String)
to see if I could reproduce the IllegalAccessException
but was not able to reproduce it in this way either. I nnly
see this error just the very first time I install the .cod file
on a fresh JDE 4.1.0 installation. So it may be that this
does not show up on an actual device.

Regards,

JG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top