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: 85
Registered: ‎05-03-2010
My Device: Not Specified
Accepted Solution

Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

Well this is confusing!!!

 

I've signed my application using the keys and the Signature tool "Request" button pops up a dialog box indicating "No signatures required" and I can see the status of the required and optional .cod signing as "Signed". But still when I look at the code, the Database code for instance, it still shows the ugly warning

 

" Signing Required: RIM Runtime API (0x52525400): Protected Class   net.rim.device.api.database.Database"

 

Am i missing something??

Developer
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

Hi,

 

Just a guess, is your cod getting updated.

 

Can you delete all *.debug files and cod,jad,jar files and again compile your project.

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

The Signature Tool relies on rapc to generate .csl and .cso which list the required and optional (respectively) signatures for each module. Sometimes your COD files may get out of sync with the .csl and .cso files, so delete them too at the beginning of each build.

 

Another issue is that sometimes (quite seldom) the JDE's net_rim_api.jar doesn't list a certain class as needing a signature, but the libraries installed on actual BlackBerry do so.

Developer
Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

Hey guys,

Thanks for the replies. So was I right to assume that if my .cod was successfully signed my code should not show the "Signing required" warnings??

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

[ Edited ]

Yes, if your code is signed with the RRT key, then BlackBerry won't complain that is it is not signed with the RRT key. However, the Signature Tool may in some cases display a .cod as signed with a key when the .cod is not signed (the Signature Tool sometimes gets confused by .csl and .cso files). Moreover, the code may have a signature, but a signatature that does not verify (e.g., code got corrupted). In this case you'll see the same error message at runtime, but there'll be an earlier verification message in the log saying that the signature did not verify.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

Sorry, I misunderstood your question. You were actually asking whether the Signature Tool may display Signing Required even though the code is already signed. I imagine this could be possible, you could try running a signature listing tool I wrote if you are interested: http://supportforums.blackberry.com/t5/Java-Development/Simple-command-line-tool-code-for-listing-co... to see what it says.

Developer
Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

Dear klyubin;

Thanks for your replies. I'll definitely look at the tool you provided. It does look impressive by the description :smileyhappy:

 

I am sorry for asking a dubious question. What I actually meant to ask was that whether the Eclipse IDE would show the Signing Required warnings in the code if the .cod file was successfully signed? That still is confusing. Let me try again. Consider this line of code :

 

 

Database _database = DatabaseFactory.open(myURI);

 

 

Now, Eclipse shows a "Signing Required:smileyfrustrated:ensitive Api..." warning on these sort of code lines. So what I meant to ask was If the code signing was successful, will these warnings go away or is it just a warning to keep reminding the developer of the sensitivity of these APIs?

 

I know someone reading all this would think, why don't I just put my .cod in the actual device and see if the .cod works or not? But the problem right there is that I don't have the device. The client is on another continent as is the device. So i need to make sure that the .cod will work if the client puts it in the actual device.

 

 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

I don't use the JDE Eclipse Plug-in. rapc may be set up to generate warnings about the need for signing -- they are indeed meant to remind you that you may be using APIs which are restricted but they have nothing to do with your code not being signed. I wonder if these are the warnings you are seeing but just rendered differently by the JDE Eclipse Plug-in. In JDE there is a checkbox to toggle such warnings for various keys -- there must be a similar setting somewhere in the JDE Eclipse Plug-in. I believe by default the warnings are automatically switched off if the Signature Tool is registered to receive signatures with these keys.

Developer
Posts: 85
Registered: ‎05-03-2010
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

Dear klyubin,

Bless you. Your class worked beautifully. This is the result it generated:

 

 

PartSelector
        RCR     0x524352
        RRT     0x545252
        RBB     0x424252
PartSelector-1
        RCR     0x524352
        RBB     0x424252
        RRT     0x545252
PartSelector-2
        RCR     0x524352
        RBB     0x424252
        RRT     0x545252

 

 

Apparently all three keys were signed properly which is a relief!! Just one more thing, what are those codes in front of the keys?

 

Once again thanks a lot.

Much Obliged.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Signature tool shows "No signatures required" and the code still shows "Signing Required" warnings!

These are just different representations of key IDs: ASCII and little-endian-hex (this is the one used in verification warnings in the Event Log).

 

Looks like the warnings you were talking about are indeed compile-time warings from rapc. Have a look for a the checkbox that disables them. For example, in JDE the checkboxes are in the Edit -> Preferences -> Code Signing tab.