IBM Support

Error 'Could not attach to JVM' when launching Java-based UI (for example 'FAP' or 'Allocations' with Controller 8.5 or later

Troubleshooting


Problem

Customer is trying to use Controller 8.5's new Java-based features (for example 'FAP' or 'Allocations'). User tries to open a user interface (UI) dialogue, for example by clicking 'Maintain - Configuration - Automatic Journals - Control Tables - Allocations'. User receives error message.

Symptom

Screen:

    Error
    Model not found in context: journalType
    Unable to find instance of model of type: journalType, type interface
    com.cognos.ccr.models.journaltype.JournalTypeModel (load=DEFAULT)
    exceptionId=ERR.ANY.WEBSERVICECONNTIONEXCEPTION.CANNOT_EXECUTE_SERVICE,
    argument(s)=[http://controllersvr/cognos8/controllerserver/CCRWS.asmx,
    010:......
    Fail : Could not attach to JVM

TIP: There is no information recorded in the Event Viewer application log.

Cause

There are several possible causes for the message "Could not attach to JVM".

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

The Java class path is not set up correctly on the server side. This causes the service "IBM Cognos Controller Java Proxy" to not be able to find a suitable Java Virtual Machine.

More information:
The service tries to find a JVM in the following order:
  1. Use the system variable CCR_JAVA_HOME
  2. If there is no CCR_JAVA_HOME variable is defined, then it will try to use the system variable 'JAVA_HOME'
  3. If this does not exist, it will use the BI/C8 JVM installed with Controller directly.

Environment

Typically, customer's 'production' systems would have the Financial Analytics Publish (FAP) service and the Controller server components installed on different/separate servers. Therefore, in most cases you would not have this problem.

However, especially for 'test' systems, you may wish to run the FAP service on the same application server (as the Controller 'main' system). In this case, you need to set the CCR_JAVA_HOME to point to a Java version 6 JVM.

Resolving The Problem

Ensure that the IBM Java 1.6 is installed on your system. Afterwards, set the system variable CCR_JAVA_HOME appropriately, on the application server.

Steps:

Part One - Checking that IBM Java 1.6 is installed

TIP: The instructions for this vary depending on which version of Controller you are using:

  • Controller 8.5: Manually extract the JRE as per the instructions below
  • Controller 10.1 (or later): You can skip this section, because the JRE is automatically copied as part of the server install routine.


    Controller 8.x: Manually extract/copy the JRE 1.6 files
    1. Logon to the Controller application server as an administrator
    2. Locate the folder ...webcontent\ccr. TIP: By default, this is: C:\Program Files\Cognos\c8\webcontent\ccr
    3. Copy the file 'jre.zip' to a sensible location (for example a network drive)
    4. Logon to the client device (where you wish to use FAP)
    5. Create a folder C:\Program Files\ibm\java60\
    6. Extract the file jre.zip to this folder.

    IMPORTANT: Check your folder structure to make sure it matches with the following:

      You should now have a folder structure with folders such as:
      • C:\Program Files\IBM\Java60\jre\bin
      • C:\Program Files\IBM\Java60\jre\lib

Part Two - Configuring the 'CCR_JAVA_Home' System Variable

  1. Obtain a short period of downtime
  2. Logon to the Controller application server as an administrator
  3. Right-click on 'My Computer' and choose 'properties'
  4. Click 'Advanced' Tab
  5. Click 'Environment Variables'
  6. Inside the 'System variables' section, add a new variable 'CCR_JAVA_HOME'
  7. Give this the relevant value.

TIP: By default:
  • for Controller 10.x this is: C:\Program Files (x86)\ibm\cognos\c10\bin\jre\6.0
  • for Controller 8.x this is: C:\Program Files\IBM\Java60\jre

8. Click 'OK', 'OK', 'OK' to save changes
9. Reboot the server, to ensure the change has been registered
10. Test
IMPORTANT: You will have to reboot the client device now for this CCR_JAVA_Home variable change to take place.

TIP: For more information, see page 88 of the Controller 8.5 installation guide ("ctrl_inst.pdf").

[{"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":"8.5.1;8.5;10.1;10.1.1","Edition":"Not Applicable","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 June 2018

UID

swg21414684