Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

RIM Signing w/ Unity 4.3.4f1 Pro broken!

Discussion in 'BlackBerry' started by allenwp, Apr 26, 2014.

  1. allenwp

    allenwp

    Joined:
    Sep 4, 2013
    Posts:
    40
    Hello,

    Please let me know ASAP if anyone has a solution to this... Trying to get a game out the door...

    I have all my signing keys (bbidtoken.csk, PBDT, and RDK), but I get the following error when I try to Register with RIM Signing Authority:
    Code (csharp):
    1.  
    2. Info: CSK file created.
    3. Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/x509/CertAndKeyGen
    4.     at net.rim.device.codesigning.keytool.KeyTool.a(Unknown Source)
    5.     at net.rim.device.codesigning.keytool.KeyTool.if(Unknown Source)
    6.     at net.rim.device.codesigning.keytool.KeyTool.a(Unknown Source)
    7.     at net.rim.device.codesigning.keytool.KeyTool.main(Unknown Source)
    8.     at net.rim.device.codesigning.barsigner.BarSigner.try(Unknown Source)
    9.     at net.rim.device.codesigning.barsigner.BarSigner.a(Unknown Source)
    10.     at net.rim.device.codesigning.barsigner.BarSigner.main(Unknown Source)
    11. Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
    12.     at java.net.URLClassLoader$1.run(Unknown Source)
    13.     at java.net.URLClassLoader$1.run(Unknown Source)
    14.     at java.security.AccessController.doPrivileged(Native Method)
    15.     at java.net.URLClassLoader.findClass(Unknown Source)
    16.     at java.lang.ClassLoader.loadClass(Unknown Source)
    17.     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    18.     at java.lang.ClassLoader.loadClass(Unknown Source)
    19.     ... 7 more
    20.  
    21. UnityEditor.HostView:OnGUI()
    My first guess was that I had the wrong JRE or something. I have Java(TM) SE Runtime Environment (build 1.8.0-b132).

    I am running Windows 8.1 64-bit with Unity 4.3.4f1 Pro.

    Please help?
     
  2. allenwp

    allenwp

    Joined:
    Sep 4, 2013
    Posts:
    40
    Good news! I fixed the problem: I needed to downgrade my JRE to version 6 (1.6).

    Maybe 1.7 also works, but 1.8 definitely does NOT work.
     
  3. Mariooo

    Mariooo

    Joined:
    Sep 7, 2014
    Posts:
    1
    I am using JDK1.6.0_45 and it doesn't work.
    I always get the same error message that is shown at the beginning of this thread.
    I have been trying for 2 days now and I am seriously considering not publishing on Blackberry since I am out of options.
    Any suggestion?
     
  4. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    What version of unity are you trying to use? Also if you open up a terminal and type "java -version" does it display version information correctly?
     
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Getting same error message on 4.6b20 (Running Yosemite OSX)
    Cannot test java - version
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit

    Could be a issue with the new Mac operating system.
     
  6. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    I'll upgrade to yosemite today and see if I can reproduce this.
     
  7. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Ok so I've updated to Yosemite today and the previously installed jdk went missing. I installed the following version of java:

    java -version
    java version "1.7.0_71"
    Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

    I was able to build a signed build without issue.

    @MrEsquire It looks like you put a space between '- and version' in your command leading to the error that you saw.
     
  8. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    You are indeed correct, this is my output:

    Code (CSharp):
    1. java version "1.8.0_40-ea"
    2. Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b09)
    3. Java HotSpot(TM) 64-Bit Server VM (build 25.40-b13, mixed mode)
    Either way I still get;

    Code (CSharp):
    1. Info: CSK file created.
    2. Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/x509/CertAndKeyGen
    And I upgraded to Unity 4.6 Beta 21

    So not sure where to start with this one.
     
  9. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Looks like you have java version 8 (technically 1.8) installed. As reported earlier in this thread the tools that come with the blackberry SDK (blackberry-deploy, blackberry-package, etc.) are written in java and apparently BlackBerry used the deprecated sun security API in their implementation. You will need to downgrade to java 7 (1.7) or an earlier version to get things working again. I'll do some poking around on my end to see if there's a way I can fix this, though my options are limited because the tool that's crashing isn't a unity app. :-(
     
  10. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I understand, the main reason for the Java upgrade is because Apple has advised users to run Java 1.8 or over, better security and yosemite support apparently. As a mac user etc much harder for me to fiddle around with the java versions due to poor unistall procedure and also mix up between Apple Java releases and Official Java downloads from the Java site. I think I try on another computer to enter debug token etc and do backup and see if I can load it on my machine or user a Windows machine..

    Thanks for checking this and spending time on it just hope Blackberry catchup with the basics, if you have some direct communication with them would be worth while to inform them.

    Thanks
     
unityunity