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
Contributor
Posts: 10
Registered: ‎09-19-2011
My Device: bold 9900
My Carrier: T mobile

Exception in NFC code

We are working on a BlackBerry application which reads contactless cards. We have used the “nfcreaderdemo” from the BB 7.0 SDK and it works fine on our BlackBerry Bold 9900 phone. Our application uses SQLite and network connection for webservice calls. When we integrate the same NFC  reader demo code with our application, it gives following exception to occur on the mobile device screen:

 

net.rim.device.api.system.ControlledAccessException : Listener belongs to another application module

 

Removing some screens and associated database calls from the application build removes the exception. However any addition of more screens reproduces the problem.

 

We have tried running the application in Debug mode, through javaloader and also through OTA. However the same problem is encountered each time.

 

The size of the cod file build for our application is 1,545 KB.

 

Could anyone please give us some pointers as to what could be causing this exception to occur? Any help will be highly appreciated as this is crucial for our development.

Contributor
Posts: 14
Registered: ‎05-06-2011
My Device: Torch 9800
My Carrier: Tata Docomo

Re: Exception in NFC code

Hi,

 

I think you can go to Options->Applications..Select your application from list and click on Edit Permissions.Change the things which are "Custom" to "Allow",save it and run your application.

Contributor
Posts: 10
Registered: ‎09-19-2011
My Device: bold 9900
My Carrier: T mobile

Re: Exception in NFC code

Thanks for the suggestion. Have tried it but it did not work. However this does not seem to be a problem with application permission as the same application works fine when some screens are removed.
Developer
Posts: 285
Registered: ‎08-26-2011
My Device: 9900
My Carrier: Not Specified

Re: Exception in NFC code

The ControlAccessException occurs only in SIMULATOR not on DEVICE. Because You are install the application only once and run many times in Device. But not like that in SIMULATOR, you are Debugging everytime.

 

When ever you get ControllAccessException simple close the simulator and run again. Because you are working on database that's why you are getting somany times. There is no problem in COD file size. We run our projects which is having in MBs.

 

If you are geting so many times clean the simulator and run again.

========================================================================================

Feel free to click THUMB symbol.

=================================================================================
Feel free to click LIKE button if the solution helps you;
--
Regards,

ALI SHAIK.
Contributor
Posts: 10
Registered: ‎09-19-2011
My Device: bold 9900
My Carrier: T mobile

Re: Exception in NFC code

It does appear on the device and not the simulator. Have tried cleaning the device memory but the same behaviour.
New Contributor
Posts: 2
Registered: ‎03-28-2011
My Device: 8900
My Carrier: Vodafone pt

Re: Exception in NFC code

Any suggestions to solve this problem?

Developer
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: Exception in NFC code

Im also having this problem. I can confirm that I only register the listener once. Hope someone has a suggestion.

Like all of my posts
Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Exception in NFC code

This is a known issue which is fixed in later device software builds as follows:

 

- 9900 (Bold): fixed in OS version 7.0.0.337 (bundle 1603)
- 9360 (Curve) fixed at 7.0.0.360 (bundle 1699).

See http://supportforums.blackberry.com/t5/Java-Development/Listener-belongs-to-another-application-modu...

 

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim