Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

J2ME: BlackBerry: ControlledAccessException

Thread view: 
John Goche - 20 Feb 2006 23:14 GMT
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
Darryl L. Pierce - 21 Feb 2006 14:34 GMT
> 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.

Signature

Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart

John Goche - 21 Feb 2006 17:40 GMT
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
Darryl L. Pierce - 22 Feb 2006 13:57 GMT
> 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.

Signature

Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart

John Goche - 22 Feb 2006 16:09 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.