IBM Support

"Could not attach to JVM" when using Controller, caused by incorrect system variable (for example 'CCR_JAVA_HOME' or 'JAVA_HOME'

Troubleshooting


Problem

User receives an error when using a JAVA-related function inside Controller.

Symptom

The exact error message will vary depending on what task the end user is running. However, it will contain the following text:

    Could not attach to JVM

Cause

There are several possible causes for this error.

  • For more examples, see separate IBM Technote #1619105.

This Technote specifically relates to the scenario where the cause is that the Controller application server has a system variable (for example CCR_JAVA_HOME or JAVA_HOME) configured to have a value different from the one that Controller needs to function.

More Information
Older versions of Cognos products may have needed System Variables (e.g. "JAVA_HOME", "CCR_JAVA_HOME" and "CCR_INTEGRATION_SERVER_DEPLOY_HOME") to allow them to work.
  • However, modern versions of Cognos products (e.g. Cognos Controller 10.2) do not need these variables.

Specifically, Controller 10.2 is now (almost entirely) a 64-bit server system, so if the CCR_JAVA_HOME or JAVA_HOME is incorrectly configured to point to an incorrect location (for example a 32-bit JRE) then these functions will fail.

Diagnosing The Problem

In theory, the Windows system variables should all be visible from the GUI here:


However, it has been seen in some environments that this does not show all the system variables.

  • Instead, sometimes you need to run the command "SET" from the command line:

Resolving The Problem

Delete the System Variable 'JAVA_HOME'.

  • Afterwards, restart the service "IBM Cognos Controller Java Proxy" (or alternatively, reboot the entire Controller application server).

Steps:
The following steps are based on Windows 2012, and should work for 99% of customer environments.
  • For other operating systems, the steps may vary slightly.

1. On the Controller application server, right-click on 'My Computer' and choose 'Properties'
2. Click "Advanced System Settings"
3. Click "Environment Variables"
4. Inside the "System Variables" section, look for an entry for 'JAVA_HOME'
5. Delete this entry
6. Restart the Windows service "IBM Cognos Controller Java Proxy".

=============================================
NOTE: In some customer environments (very rare) the Controller application server's registry *also* contains some more 'system variables' inside the following registry keys:
  • HKLM\System\ControlSet001\Control\Session Manager\Environment
  • HKLM\System\ControlSet002\Control\Session Manager\Environment


You therefore may need to adjust some settings directly in the registry.
=============================================

[{"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Controller","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.2.1;10.2.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21678643