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
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified
Accepted Solution

Error Starting a Signed Application

I have a signed application that installs and runs properly on a number of devices.  On a few devices, the application fails to start with the error "Error starting <name>: Module '<name>' attempts to access a secure API."  I am using secure APIs, but my COD is properly signed.  Is there a setting on the phone that might be causing this problem?  How can I see which API is causing the problem?
Developer
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified

Re: Error Starting a Signed Application

[ Edited ]

I deleted the application and then reinstalled from the same location and now it works.  This was an over-the-air (OTA) installation; could the problem be data corruption during the download?  That seems unlikely.  Any other ideas?

 

The event log shows a RuntimeException and a stack trace.  Here is the stack trace:

 

guid:0x97C9F5F641D25E5F time: Tue Feb 17 17:49:15 2009  severity:0 type:2 app:System data:VM:LINK myApplication
guid:0x97C9F5F641D25E5F time: Tue Feb 17 17:49:15 2009 severity:0 type:2 app:System data:CMM: myApplication(9875) invalid sig for 0x545252
guid:0x97C9F5F641D25E5F time: Tue Feb 17 17:49:15 2009 severity:0 type:2 app:System data:module 9875 cannot reference net.rim.device.api.system.PersistentObject
guid:0x97C9F5F641D25E5F time: Tue Feb 17 17:49:15 2009 severity:0 type:2 app:System data:Module 'myApplication' attempts to access a secure API.

guid:0x97C9F5F641D25E5F time: Tue Feb 17 17:49:15 2009 severity:0 type:2 app:System data:Linker error: 'VerifyError' for myApplication
guid:0x97C9F5F641D25E5F time: Tue Feb 17 17:49:15 2009 severity:0 type:2 app:System data:Error starting myApplication: Module 'myApplication' attempts to access a secure API.
guid:0x9C3CD62E3320B498 time: Tue Feb 17 17:49:15 2009 severity:1 type:3 app:Java Exception data:
RuntimeException
Error starting myApplication: Module 'myApplication' attempts to access a secure API.
net_rim_bb_framework_api-1
ApplicationEntryPoint
run
0x242A
net_rim_bb_ribbon_app-2
ApplicationEntry
invoke
0x5D0
net_rim_bb_ribbon_app-1
RibbonLauncherImpl
<private>
0x5222
net_rim_bb_ribbon_app-1
RibbonLauncherImpl
launch
0x3D95
net_rim_bb_ribbon_app
ApplicationMenu
trackwheelClick
0x832
net_rim_bb_ribbon_app
ApplicationMenu
navigationClick
0x852
net_rim_cldc-8
Screen
dispatchNavigationEvent
0x76CA
net_rim_cldc-9
UiEngineImpl
processMessage
0x9E08
net_rim_cldc-6
Application
processNextMessage
0xF06
net_rim_cldc-6
Application
enterEventDispatcher
0x5C6
net_rim_bb_ribbon_app-1
RibbonLauncherApp
main
0x38BA
It looks like the problem is on the second line: "invalid sig for 0x545252."  Does that mean anything to anyone?
Message Edited by almeida on 03-18-2009 09:30 AM
Developer
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified

Re: Error Starting a Signed Application

The application throws the RuntimeException mentioned above on two devices: a Curve and Bold.  On both, the application was installed over the air (OTA) via the web browser using AT&T service.

 

On the Bold, I deleted the application and reinstalled from the same location, except this time I used WiFi.  The application runs fine now on that device.

 

On the Curve, I deleted and reinstalled from the same location and again used AT&T service.  Even after reinstalling, the application throws the same RuntimeException.  I deleted and reinstalled the same OTA .cod files using javaloader.  Now the application runs fine on this device too.

 

Is the carrier doing something strange with the OTA install?  I've done successful OTA installs in the past on Storms using Verizon and AT&T.

 

I'm totally stumped. 

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Error Starting a Signed Application

This indicates that your application is either missing or that there is a problem with the RRT signature.  What version of BlackBerry handheld software are you testing on?  What version of BlackBerry JDE are you using?  If you are using JDE version 4.5.0 through to 4.7.0 please see this link.

 

Support - Signing does not apply the RIM Runtime signature key
Article Number: DB-00717

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/Support_-_Sign...

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
Developer
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified

Re: Error Starting a Signed Application

[ Edited ]

We are building with 4.2.1.  We build a jar with straight javac, turn it into a .cod with rapc, and then sign it with the SignatureTool.  The SignatureTool always shows that RRT is required.  It seems unlikely thati's a problem with a missing signature because, as I said, deleting and reinstalling solved the problem on both devices.  On the Bold, I deleted and reinstalled from the same exact source (OTA) and it worked the second time.  The only change was AT&T vs. WiFi.  On the Curve, deleting and reinstalling via OTA didn't work, but using javaloader to send the .cod files directly to the device worked.  The .cod files I used with javaloader were the same from the OTA installation.

 

In addition, the very same .cod files have been installed and run fine on other devices, including 8130, 8220, 8310, 8820, 8900, 9000, and 9530 running various versions of the handheld software, and using various installation routes, including OTA with Verizon, OTA with AT&T, OTA with WiFi, Desktop Manager, and javaloader.

 

I'm not sure what version of handheld software the Bold was running.  It was a loaner from RIM and we don't have it anymore, but I assume it was 4.6.0.  The Curve is 4.2.2.170 (312).

Message Edited by almeida on 03-25-2009 01:02 PM
Message Edited by almeida on 03-25-2009 01:02 PM
BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Error Starting a Signed Application

Are you using the AT&T WAP Browser?  If so, do you see the same issue when using the BlackBerry Browser or Internet Browser? 

 

If it is only seen using the carrier's WAP browser verify that the file sizes reported in the JAD file are correct.  These values are not updated after a COD file has been signed (that does increase their size).  AT&T's WAP gateway may be truncating the COD file that is being sent to the BlackBerry handheld.

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
Developer
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified

Re: Error Starting a Signed Application

I just recreated the problem on another Bold. Using AT&T service and the BlackBerry browser, I did an OTA install.  The application installed fine, but gives the same error about accessing a secure API.  I modified the file sizes reported in the .jad file, but the same error occurs when you start the application.

 

I disabled the network and repeated the install with Wi-Fi and the application installed and runs fine now.  The SIM card in the phone has an active voice and data plan with AT&T, but it does not have a BlackBerry plan.  Could that be the cause of the problem?  Is AT&T intercepting my install because I don't have BlackBerry service?  We've noticed that we can't install BlackBerry App World on devices without active BlackBerry plans.

 

That would explain my trouble with this Bold and the previous one (the loaner from RIM).  I'm not sure if the Curve had a BlackBerry plan though.

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Error Starting a Signed Application

I haven't heard of a carrier blocking applications like this before.  It would also be difficult for them to strip off only the signature portion.

 

Their WAP Gateway may be going by the file size in the JAD file.  The sizes in the JAD are not updated when an application is signed.  Therefore if the WAP Gateway is cutting off the download at that point, it would result in the signatures (appended to the COD file) being stripped off.  Try updating the sizes listed in the JAD file and let us know if the problem persists.

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
Developer
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified

Re: Error Starting a Signed Application

I updated the .jad with the new file sizes for the .cod files, but I get the same error.  The device is a Bold, app version 4.6.0.167, platform 4.0.0.157.  The application downloads and installs, but fails when I run it.  The error is "Error starting MyApp: Module 'MyApp-2' attempts to access a secure API."

 

 

guid:0x97C9F5F641D25E5F time: Thu May 07 07:53:57 2009 severity:0 type:2 app:System data:VM:LINK MyApp

guid:0x97C9F5F641D25E5F time: Thu May 07 07:53:57 2009 severity:0 type:2 app:System data:CMM: MyApp-2(8352) invalid sig for 0x545252

guid:0x97C9F5F641D25E5F time: Thu May 07 07:53:57 2009 severity:0 type:2 app:System data:module 8352 cannot reference net.rim.device.api.system.CodeModuleGroup

guid:0x97C9F5F641D25E5F time: Thu May 07 07:53:57 2009 severity:0 type:2 app:System data:Module 'MyApp-2' attempts to access a secure API.

guid:0x97C9F5F641D25E5F time: Thu May 07 07:53:57 2009 severity:0 type:2 app:System data:Linker error: 'VerifyError' for MyApp

guid:0x97C9F5F641D25E5F time: Thu May 07 07:53:57 2009 severity:0 type:2 app:System data:Error starting MyApp: Module 'MyApp-2' attempts to access a secure API.

 

 If I disable the Mobile Network (AT&T) and enable Wi-Fi, I can reinstall from the same URL and the application will run.

 

Developer
almeida
Posts: 91
Registered: ‎02-04-2009
My Device: Not Specified

Re: Error Starting a Signed Application

 AT&T's proxy server was corrupting one of my .cod files during download.  However, the problem was my fault: our web server was serving .cod files with the incorrect encoding ("text/plain" instead of "application/vnd.rim.cod").  I fixed the encoding and can now install successfully using AT&T.
 
It's strange that this only happened with AT&T's MediaNet browser and that the error message mentions a secure API instead of reporting a corruption problem.