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
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

[ Edited ]

I created a test app for some OpenGL stuff and tried to install it on my BlackBerry to see if some of the problems I have been having were from the simulator or from something I coded. I got the standard message "Module <name> attempts to access a secure API."

 

I ran the app through the SigningTool that came with Eclipse Plugin 1.1 and it says that I need to have it signed with RIMAPPSA2. I remember reading that RIMAPPSA2 means a non-public class/interface is being accessed but all the classes/interfaces I use either I wrote or are public. The end result is obviously that I cannot run the app on a physical device.

 

Has anyone else experienced this or knows what might be causing it?

 

On a side question, is there any way to find what source code files are using signed classes?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

Clear the Event Log and cold-reboot the device with your module installed. What you should see in the Event Log is this. I believe that during the boot phase there will be a couple of lines dedicated to the error in your module, listing the name of the offending class. If it's not there, try starting your app -- if I recall correctly, the OS will again log the name of the offending class and method in the Event Log.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

Thanks, will try and respond with results.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

Sorry I'm late, busy lately.

 

I cleared the log, pulled the battery, tried the app.

 

Here's the log.

 

It does mention my app (The one know as SetionTesting, I typed too fast and forgot the 'c') but it says verification/linking error.

 

When I ran it it throws the error before main is called so I can't do much.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

Looks like your module SetionTesting is referencing net.rim.device.api.ui.FontMetrics but does not have the required signature to do so. Please check which signatures your module has. You can find the list in Options -> Applications -> (menu) -> Modules -> (select your module, and click on it) -- look for Signer IDs section.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

[ Edited ]

Couple things:

  1. How did you figure out it was the FontMetrics? I didn't see anything about that in the log (going to look again)
  2. FontMetrics doesn't require a signing key so I find it odd that it would cause it to not work.
  3. When I view my module it doesn't have anything about the Signer IDs (because I didn't sign it, the SigningTool tells me I can't sign it because I need RIMAPPSA2 which is not possible).
  4. How can I fix this? I get it with pretty much everything I am codding, I would like to do something more detailed then Hello World (if Hello World doesn't get the same error).

Thank you for helping though.

 

EDIT: Found where FontMetrics is mentioned. That is odd, would think that that would be on the actual device. Also I compiled Hello World and luckily it didn't require RIMAPPSA2.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

What makes you think that FontMetrics does not require a signature? As to RIMAPPSA2 signature, you're probably invoking some undocumented API (e.g., an undocumented method). Try commenting out some code to find out what part of your code adds the requirement of RIPAPPSA2 signature. Once your code is free from this requirement, you can then sign the module, and the module will not be getting the "Cannot access secure API" exception any more.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

[ Edited ]

I just checked the documentation that came with BlackBerry plugin 1.1 for Eclipse and FontMetrics is labeled as unsigned. But I also checked the online documentation and FontMetrics isn't mentioned so I wonder if that is considered a undocumented feature? Let me try...

 

Tried commenting out just FontMetrics (and adding to another app) but it didn't make a difference. As stated in the original post, is there any tool/utility to find what source files contain a non-public classes/functions? The types that require signing are presented as warnings unless specified not to.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Administrator
MSohm
Posts: 14,296
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

What BlackBerry Smartphone model and BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.  Can you post a new eventlog taken after removing FontMetrics?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: API 5.0: RIMAPPSA2 signing required for app that doesn't use signed classes

[ Edited ]

Look at the "My Device" label under my name.

 

Interesting, as stated previously FontMetrics don't cause the Eclipse plugin 1.1 to say that I need to use RIMAPPSA2 (if I create a generic app and add FontMetrics the signing issue doesn't pop up and if I remove FontMetrics from SetionTesting the signing issue doesn't go away).

 

Yet the application is put on an actual device, if it has FontMetrics I get the ControlledAccessException, if it doesn't have the FontMetrics it doesn't get the ControlledAccessException. So I was actually able to run the application but it doesn't draw anything so either I am doing something wrong or OpenGL doesn't work just yet on an actual device.

 

Either way I put the applications on the actual device, cleared the event log, and restarted the device with a battery pull. Then ran the app.

 

eventLog_w_FontMetrics -- With FontMetrics

eventLog_wo_FontMetrics -- Without FontMetrics

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.