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

Article ID: KB25011

Type: Support Content

Last Modified: 02-03-2014


Product(s) Affected:

  • BlackBerry Enterprise Server for Microsoft Exchange
  • BlackBerry Enterprise Server 5.0 SP1 to 5.0 SP4
  • Java Runtime Environment (JRE)
  • Java Development Kit (JDK) 
After following the steps listed in KB17872 to perform an upgrade to the JRE, the BlackBerry Enterprise services for BlackBerry Mobile Data System Connection Service, BlackBerry Administration Service Application Server, BlackBerry Administration Service Native Code Container, BlackBerry Collaboration Service, and BlackBerry Monitoring Service do not start. Default service log files are not created, and in the Windows Event Viewer, error codes are generic.
In the BAS-AS_err.log the following error is logged:
Error encountered while starting server: Illegal key size or default parameters
com.rim.bes.bas.system.EncoderException: Illegal key size or default parameters
at com.rim.bes.bas.system.Encoder.decode(
at com.rim.bes.bas.system.Encoder.decode(
at com.rim.bes.bas.system.BASMain.getKeyStoreRegistryKeyValues(
at com.rim.bes.bas.system.BASMain.initialize(
at com.rim.bes.bas.system.BASMain.main(
Caused by: 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(
... 4 more

When a Java 1.6.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.

This is a previously reported issue that is being investigated by our development team. No resolution time frame is currently available.

The following applies to any Java 1.6.0 update, including 22 or higher. 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).

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 installation drive:\Program Files\Java\jre1.6.0_update# and installation drive:\Program Files\Java\jdk1.6.0_update# or program files (x86)\Java\jre1.6.0_## if it is a 64-bit operating system, where # is the update version installed.

  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 download jre-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 installation drive:\Program Files\Java\jre1.6.0_22 or installation drive:\Program Files (x86)\Java\jre1.6.0_22.
  6. Install JDK Update 22.
    JDK installs into the correct path by default, but verify that it is installed onto your installation drive to 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:
    • Open Regedit and modify the following registry keys to match the installation path of Java:
    • Registry key: H KEY_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.
    • 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.
    • 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.
    • 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.
    • 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.
    1. Extract the files contained within the zip file:
      • US_export_policy.jar
      • local_policy.jar
  11. 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 local_policy.jar and the US_export_policy.jar files.
  12. 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 local_policy.jar and the US_export_policy.jar files.
  13. Restart all BlackBerry Enterprise Server services per KB13718.

Note: This work around was also successful using the default JRE 1.6.0 Update 18 that is included with the BlackBerry Enterprise Server extracted files and the 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.


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

   (a) that the terms of use for the documents found at 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