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

Web and WebWorks Development

Reply
Contributor
diegoadrada
Posts: 18
Registered: ‎03-22-2013
My Device: Playbook
My Carrier: N/A

Problem signing my App

[ Edited ]

I'm trying to sign my app but I always get the same error: Signing Failed.

 

I've tried using the method from console and from the Ripple Emulator, in both cases get the same error, here is the log:

 

[INFO]                  Parsing command line options
[INFO]                  Parsing bbwp.properties
[INFO]                  Validating WebWorks archive
[INFO]                  Parsing config.xml
[INFO]                  Populating application source
[INFO]                  Compiling WebWorks application
[INFO]                  Packaging the bar file
[INFO]                  Bar packaging complete
[INFO]                  Starting signing tool
Exception in thread "main" java.lang.ExceptionInInitializerError
        at javax.crypto.SecretKeyFactory.nextSpi(SecretKeyFactory.java:294)
        at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:120)
        at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:159)
        at sun.security.pkcs12.PKCS12KeyStore.getPBEKey(Unknown Source)
        at sun.security.pkcs12.PKCS12KeyStore.engineLoad(Unknown Source)
        at java.security.KeyStore.load(Unknown Source)
        at net.rim.device.codesigning.barsigner.BarSigner.a(Unknown Source)
        at net.rim.device.codesigning.barsigner.BarSigner.a(Unknown Source)
        at net.rim.device.codesigning.barsigner.BarSigner.main(Unknown Source)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechani
sm
        at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:86)
        ... 9 more
Caused by: java.lang.SecurityException: The jurisdiction policy files are not si
gned by a trusted signer!
        at javax.crypto.JarVerifier.verifyPolicySigned(JarVerifier.java:289)
        at javax.crypto.JceSecurity.loadPolicies(JceSecurity.java:316)
        at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:2
61)
        at javax.crypto.JceSecurity.access$000(JceSecurity.java:48)
        at javax.crypto.JceSecurity$1.run(JceSecurity.java:78)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:76)
        ... 9 more
[ERROR]                 Signing failed

 

 

 

In the Ripple Emulator works very well "Package" and "Package and Install" but not "Package and sign"

Given what I've read here in the forum tried returning to Java JDK version 1.6, however it did not work.

I tried many ways and I definitely have not gotten to make it work so I write here, I really appreciate your help.

 

Please use plain text.
Trusted Contributor
nikmaster
Posts: 116
Registered: ‎11-10-2012
My Device: BB Playbook
My Carrier: MTS

Re: Problem signing my App

Well, if nothing else works, you can always create VM, make clean installation of Windows and  required software inside it. This will remove all interference that may be caused by other software installed. I realize that it is a hard way but that should work.



Please click the Thumbs Up icon if this comment has helped you! If your issue is resolved, please click the solution button on the resolution!


Please use plain text.
Contributor
diegoadrada
Posts: 18
Registered: ‎03-22-2013
My Device: Playbook
My Carrier: N/A

Re: Problem signing my App

It's possible that this is the only solution so far?

Please use plain text.
Developer
mamdohreda
Posts: 73
Registered: ‎10-31-2011
My Device: Q10
My Carrier: etisalat

Re: Problem signing my App

may problem .you have problem in java JDK on you PC or project file have confilct code that make problem

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem signing my App

Hi there, on top of JDK 1.6, you must ensure that it is the 32-bit version, not 64-bit. Can you please double-check in bbwp.properties where the <java> element is point? Example:

 

<java>C:\Program Files (x86)\Java\jdk1.6.0_31</java>

 


Beyond that, can you please confirm which WebWorks SDK you are using to package, as well as the full command being executed? (It didn't show up in the original text posted.)

 

If you can also provide a list of folders installed at the following two locations, it will help verify if any potential conflicts exist:

C:\Program Files\Java

C:\Program File (x86)\Java

 


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
diegoadrada
Posts: 18
Registered: ‎03-22-2013
My Device: Playbook
My Carrier: N/A

Re: Problem signing my App

Hi, thanks for your interest, in bbwp.properties I have this:

<java>C:\Program Files (x86)\Java\jdk1.6.0_45</java>

But previously, I had this:

<java>C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\jre</java>

I'm using BlackBerry WebWorks SDK for TabletOS 2.2.0.5.

The full comand being executed:

bbwp C:\BlackBerryWorkspace\packaged\myApp.zip -g mypassword -buildId 10 -o C:\BlackBerryWorkspace\

But I've tried from ripple with "Package and sign" and it gives me the same error.

Here is the list of folders installed:

For C:\Program File (x86)\Java:
jdk1.6.0_45
jdk1.7.0_04
jre6
jre7

For C:\Program Files\Java:
jdk1.7.0_03
jre7

Thanks a lot for your help.
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem signing my App

Just as a quick confirmation as to whether this is being caused by the Java version, could you rename the following:

C:\Program Files\Java
C:\Program Files (x86)\Java\jdk1.7.0_04
C:\Program Files (x86)\Java\jre7

To:

C:\Program Files\Java_
C:\Program Files (x86)\Java\jdk1.7.0_04_
C:\Program Files (x86)\Java\jre7_

Basically, adding a _ character to the end of everything that isn't the 32-bit version of JDK6 / 1.6.

This will leave the only viable Java path as the desired JDK/JRE combination and we should be able to see if that affects success.

It's not a permanent solution, but we'll at least get an idea if we're looking at the right cause.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.