Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

uploading of image from device

i want to upload the image from the device ...for this i am using filepicker()...i am getting the path. To the path i am using fileconnection() to open it...but it is throwing me exception as "controlled access exception".

can any one  tell my why it is throwing exception in device....when i am trying in simulator the  image is

sucessfully loading. Then why in device not?

Developer
Posts: 16,750
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: uploading of image from device

check the permissions for your application.
also read the detail message of the controlled access exception.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

Re: uploading of image from device

i set my application permission to allow for all and the complete exception is:

"net.rim.device.api.system.controlledAccessException

Developer
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

Re: uploading of image from device

still same error is continuing

Developer
Posts: 16,750
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: uploading of image from device

the detail message would be:
http://www.blackberry.com/developers/docs/7.1.0api/java/lang/Throwable.html#getMessage()

also check the device log (alt+lglg)

make sure that the image you are selecting is available to you, for example a taken picture. some images are system files and not available for a program.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

Re: uploading of image from device

while encodeing the image i am getting the exception.What to do now . can anyone tell me

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: uploading of image from device

What statement in your program are you executing when you get the exception?

 

Assuming this is some API call, then what does the Java doc for that API call say for that Exception?

Developer
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

Re: uploading of image from device

i am just displaying  a dialog box in catch block

Highlighted
Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: uploading of image from device

I have not checked, but I don't beleive that any of the Dialogs will throw that exception.  Are you catching the Exception and then displaying a Dialog?  You need to look at the statement that caused the Exception to be generated.

 

If you can't find that statement, then i suggest that you debug on device, which will probably catch this Exception easier:

http://supportforums.blackberry.com/t5/Java-Development/How-Do-I-Debug-on-a-Live-Device/ta-p/446842