Version 2

    Introduction

    When you compile your Maven project or try to send your license to our reporting servers from a development environment, you can run into some issues that will not allow you to finish what you are doing. This can be very tedious to troubleshoot and can lead to a long discussion with Jive Support or your frustration. There is a very simple solution to this issue that is as simple as copying two files to your development environment's JDK.

     

    Symptoms

    Here are the symptoms for this issue that you will most likely come across when trying to send your license to the Jive servers:

    java.lang.RuntimeException: java.security.InvalidKeyException: Illegal key size or default parameters
        at com.jivesoftware.community.license.metering.impl.MeteringEncryptionProvider.decrypt(MeteringEncryptionProvider.java:68)
        at com.jivesoftware.community.license.metering.impl.JiveMeteringManager.decryptToDouble(JiveMeteringManager.java:448)
        at com.jivesoftware.community.license.metering.impl.JiveMeteringManager.convertFrom(JiveMeteringManager.java:434)
        at  com.jivesoftware.community.license.metering.impl.JiveMeteringManager.setMeteredResourceUsageStatus(JiveMeteringManager.java:100)
        at com.jivesoftware.community.license.metering.seat.impl.JiveSeatsMeter.process(JiveSeatsMeter.java:69)
        at com.jivesoftware.community.license.metering.seat.impl.JiveSeatsMeterTask.process(JiveSeatsMeterTask.java:47)
        at com.jivesoftware.community.license.metering.seat.impl.JiveSeatsMeterTask.run(JiveSeatsMeterTask.java:36)
        at com.jivesoftware.util.task.TaskEngine$GuardedRunnable.run(TaskEngine.java:600)
        at com.jivesoftware.util.task.TaskEngine$TaskEngineWorker.run(TaskEngine.java:501)
    Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.a(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
    
    
    
    

     

    You can also encounter this issue when building your Maven project:

    [INFO] [talledLocalContainer] Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
    [INFO] [talledLocalContainer]     at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1011)
    [INFO] [talledLocalContainer]     at javax.crypto.Cipher.implInit(Cipher.java:786)
    [INFO] [talledLocalContainer]     at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
    [INFO] [talledLocalContainer]     at javax.crypto.Cipher.init(Cipher.java:1213)
    [INFO] [talledLocalContainer]     at javax.crypto.Cipher.init(Cipher.java:1153)
    [INFO] [talledLocalContainer]     at com.jivesoftware.base.encryption.BasicEncryptionProvider.encrypt(BasicEncryptionProvider.java:61)
    [INFO] [talledLocalContainer]     ... 40 more
    
    
    
    

     

    Resolution

    The remedy for this would be to update your security JARs in your JRE with the ones that we provide and use at Jive. Follow these steps to resolve this issue:

    1. Grab these 2 jars attached to this post
      • local_policy.jar
      • US_export_policy.jar
    2. Copy the jars to your JDK's lib/security directory.
      • Sun JDK (Windowss and Linux) - <jdk_home>/jre/lib/security
      • OS X - System/Library/Frameworks/JavaVM.framework/Versions/<your_version>/Home/lib/security