Cannot start BlackBerry Enterprise Server services automatically after an upgrade to Java 1.6.0

Article ID: KB25011

Type: Support Content

Last Modified: 05-22-2014

 

Product(s) Affected:

  • BlackBerry Enterprise Server for Microsoft Exchange
CollapseEnvironment
  • BlackBerry Enterprise Server 5.0 SP1 to 5.0 SP4
  • Java Runtime Environment (JRE)
  • Java Development Kit (JDK) 
CollapseOverview

After following the steps listed in KB17872 to perform an upgrade to the JRE, the following BlackBerry Enterprise services do not start:

  • BlackBerry Mobile Data System Connection Service
  • BlackBerry Administration Service Application Server
  • BlackBerry Administration Service Native Code Container
  • BlackBerry Collaboration Service
  • BlackBerry Monitoring Service.

Default service log files are not created, and in the Microsoft Windows Event Viewer, error codes are generic.
 
In the BAS-AS_err.log the following error is logged:
 
Error encountered while starting server: java.security.InvalidKeyException: Illegal key size or default parameters
com.rim.bes.bas.system.EncoderException: java.security.InvalidKeyException: Illegal key size or default parameters
at com.rim.bes.bas.system.Encoder.decode(Encoder.java:505)
at com.rim.bes.bas.system.Encoder.decode(Encoder.java:423)
at com.rim.bes.bas.system.BASMain.getKeyStoreRegistryKeyValues(BASMain.java:1637)
at com.rim.bes.bas.system.BASMain.initialize(BASMain.java:1366)
at com.rim.bes.bas.system.BASMain.main(BASMain.java:1109)
Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at com.rim.bes.bas.system.Encoder.decode(Encoder.java:500)
... 4 more

CollapseCause

When a Java 1.6.0/1.7.0 Update is manually installed into a different installation path, or automatic updates for Java applications are turned on and the installation path was not modified during installation. Java has changed the installation path from installationdrive:\Program Files\Java\jre1.6.0_update# to installationdrive:\Program Files\Java\jre6.

CollapseResolution
This is a previously reported issue that is being investigated by our development team. A resolution is currently unavailable.
CollapseWorkaround

The following applies to any Java 1.6.0 update, including 22 or later. These instructions are for Java 1.6.0 update 22, but the same instructions would apply for any other supported java update (for example Java 1.6.0 update 31).

Follow these installation steps:

Note: In order for the BlackBerry Enterprise Server to function correctly, the JRE and the JDK must be installed into the original default installation paths of: (where # is the update version installed)

  • installation drive:\Program Files\Java\jre1.6.0_update#
  • installation drive:\Program Files\Java\jdk1.6.0_update#
  • program files (x86)\Java\jre1.6.0_## (if it is a 64-bit operating system)
  1. Stop all BlackBerry Enterprise Server services.
  2. Open the Windows Control Panel and uninstall JRE 1.6.0 Update 18 and JDK 1.6.0 Update 18.
  3. Download the 32-bit version of JRE update 22 and JDK Update 22 from Java
    • For JRE downloadjre-6u22-windows-i586 or jre-6u31-windows-i586
    • For JDK download jdk-6u22-windows-i586 or jdk-6u31-windows-i586
  4. Install JRE Update 22 first, and select the check box in the lower left corner to modify the installation directory.
  5. Change the JRE installation directory to one of the following:
    • installation drive:\Program Files\Java\jre1.6.0_22
    • installation drive:\Program Files (x86)\Java\jre1.6.0_2

      Note: For BlackBerry Enterprise Server version 5.0.4 MR7 the java location should be:
      C:\Program Files (x86)\Java\jre1.7.0_51\bin\client\jvm.dll
         
  6. Install JDK Update 22. JDK installs into the correct path by default, but verify the installation path it installed to on your installation drive is:
    installation drive:\Program Files\Java\jdk1.6.0_22 or installation drive:\Program Files (x86)\Java\jdk1.6.0_22.
  7. Go into the Control Panel and double-click the Java Application.
    1. Click the Update tab.
    2. Clear the Check for Updates Automatically check box.
  8. Restart the server.
  9. Once the server has restarted, stop the BAS-AS and BAS-NCC services so that the registry can be modified. After the services are stopped, complete the following steps:
    1. Open Regedit and modify the following registry keys to match the installation path of Java:
    2. Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BAS-AS\Parameters
      Registry value: JVM Library = installationdrive:\Program Files\Java\jre1.6.0_22\bin\client\jvm.dll or installationdrive:\Program Files (x86)\Java\jre1.6.0_22\bin\client\jvm.dll.
    3. Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BAS-NCC\Parameters
      Registry value: JVM Library = installationdrive:\Program Files\Java\jre1.6.0_22\bin\client\jvm.dll or installation drive:\Program Files (x86)\Java\jre1.6.0_22\bin\client\jvm.dll.
    4. Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry MDS Connection Service
      Registry value: ImagePath = " installation drive:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\bin\bmds.exe" -s jvmpath="installation drive:\Program Files\Java\jre1.6.0_22\bin\client\jvm.dll" -XX:+DisableExplicitGC -Xss128K -Xmx768M -Xms128M classpathdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\classpath\\" wrkdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\Servers\Instance\\" webserverdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\MDS\webserver\\" -rbes "SERVER01_MDS-CS_1" .

      Note: If 64 bit Windows is installed, change the jvmpath to: installationdrive:\Program Files (x86)\Java\jre1.6.0_22\bin\client\jvm.dll.
    5. Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BlackBerry Collaboration Service
      Registry value: ImagePath = " C:\Program Files\Research In Motion\BlackBerry Enterprise Server\BBIM\bin\bcol.exe" -s jvmpath="C:\Program Files\Java\jre1.6.0_22\bin\client\jvm.dll" -XX:+DisableExplicitGC -Xss64K -Xmx512M -Xms128M classpathdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\BBIM\classpath\\" wrkdir="C:\Program Files\Research In Motion\BlackBerry Enterprise Server\BBIM\Servers\Instance\\" -feature sametime -rimbes "SERVER01_BBIM_1 .

      Note: If 64 bit Windows is installed, change the jvmpath to = C:\Program Files (x86)\Java\jre1.6.0_22\bin\client\jvm.dll.
    6. Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\BBMonitoringConsole\Parameters\Java
      Registry value: Jvm = installation drive:\Program Files\Java\jdk1.6.0_22\jre\bin\client\jvm.dll or installation drive:\Program Files (x86)\Java\jdk1.6.0_22\jre\bin\client\jvm.dll.
  10. Download the JCE Jurisdiction Policy Files from Java.
    Note : This will be a zip file.
  11. Extract the files contained within the zip file:
    • US_export_policy.jar
    • local_policy.jar
  12. Navigate to installation drive:\Program Files\Java\jre1.6.0_22\lib\security or installation drive:\Program Files (x86)\Java\jre1.6.0_22\lib\security.
    1. Replace the US_export_policy.jar and the local_policy.jar files.
  13. Navigate to installation drive:\Program Files\Java\jdk1.6.0_22\jre\lib\security or installation drive:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\security.
    1. Replace the US_export_policy.jar and the local_policy.jar files.
  14. Restart all BlackBerry Enterprise Server services per KB13718.

Note: This workaround was also successful using the default JRE 1.6.0 Update 18 that is included with the BlackBerry Enterprise Server extracted files and the jce_policy-6.zip from Java for step 10.

CollapseAdditional Information
The BAS-AS_err.log file can be found in installation drive:\Program Files\Research In Motion\BlackBerry Enterprise Server\BAS\jboss\ejb\bin\.

BlackBerry Enterprise Server is a 32-bit application and requires the download of the 32-bit version of Java.

Disclaimer

By downloading, accessing or otherwise using the Knowledge Base documents you agree:

   (a) that the terms of use for the documents found at www.blackberry.com/legal/knowledgebase apply to your use or reference to these documents; and

   (b) not to copy, distribute, disclose or reproduce, in full or in part any of the documents without the express written consent of RIM.


Visit the BlackBerry Technical Solution Center at www.blackberry.com/btsc.