Appreciations accepted

Vladlen Litvinov, the author: If you have some job offer for me, I'm ready to discuss it. View Vladlen Litvinov's profile on LinkedIn

Password

Monday, December 17, 2012

Error "Undefined variable WAS_INSTALL_ROOT" after creating of clustering environment

After creating of clustering environment some of datasources didn't work.


On checking of datasources through ISC we get:

The test connection operation failed for data source ESBLoggerMediationDataSource on server dmgr at node bpmtestCellManager01 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable WAS_INSTALL_ROOT. View JVM logs for further details.

The test connection operation failed for data source WPS data source on server dmgr at node bpmtestCellManager01 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable WAS_INSTALL_ROOT. View JVM logs for further details.


There are two variables of WAS_INSTALL_ROOT in WebSphere Variables.
Pay our attention to the Scope of our datasources and variales.

Broken datasources have the Scope of the Cell:


But there is not WAS_INSTALL_ROOT in this scope.
Let's create it.


Check connection again and:

The test connection operation for data source ESBLoggerMediationDataSource on server dmgr at node bpmtestCellManager01 was successful.
The test connection operation for data source WPS data source on server dmgr at node bpmtestCellManager01 was successful.


By the way, how is WAS_INSTALL_ROOT affect to the state of datasources in WAS?

Very simply.

The path to the database's driver (ex. for Oracle) is
${ORACLE_JDBC_DRIVER_PATH}/ojdbc6.jar by default
and
${ORACLE_JDBC_DRIVER_PATH} = ${WAS_INSTALL_ROOT}/jdbcdrivers/Oracle

The datasource cannot find the driver.

P.S. If you won't be able to create WAS_INSTALL_ROOT (there is some problem in WAS), use my trick:

1. First create a variable named WAS_INSTALL_ROOT_ (for example).
2. Then rename WAS_INSTALL_ROOT_ to WAS_INSTALL_ROOT. 

5 comments:

  1. Hello,

    In my case WAS_INSTALL__ROOT was updated fine on websphere veriables but still it was giving same error. I replaces WAS_INSTALL_ROOT with absolute path of the jar file and it worked fine.

    Thank you!!!!

    ReplyDelete
  2. Hi

    Interestingly, WAS 8.5.5 doesn't allow one to create a cell-scoped variable called WAS_INSTALL_ROOT.

    I get: -

    Error The variable WAS_INSTALL_ROOT cannot be created.

    This ties up with this APAR: -

    PM50498: USER SHOULD NOT BE ALLOWED TO CREATE WAS_INSTALL_ROOT VARIABLE ON ADMIN CONSOLE

    http://www-01.ibm.com/support/docview.wss?uid=swg1PM50498

    but goes against this APAR: -

    PM46651: UNABLE TO MODIFY WAS_INSTALL_ROOT AND USER_INSTALL_ROOT FROM THE ADMINISTRATIVE CONSOLE.

    http://www-01.ibm.com/support/docview.wss?uid=swg1PM46651

    This only occurs because IBM BPM Advanced 8.5 creates a pair of JDBC data-sources scoped at cell-level, both of which refer to a cell-scoped variable - DB2_JCC_DRIVER_PATH - which needs to be created, and which refers to the cell-scoped WAS_INSTALL_ROOT environment variable.

    In the end, I cheated by using WAS_INSTALL_ROOT2 :-)

    Cheers, Dave

    ReplyDelete
  3. You are right, Dave.
    I solved this problem by the same way :)

    ReplyDelete
  4. Vladlen

    I was able to create the WAS_INSTALL_ROOT variable via Jython, even though I couldn't do it via the Integrated Solutions Console.

    Here's the Jython that I used: -

    /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/wsadmin.sh -lang jython -user wasadmin -password passw0rd
    AdminConfig.create('VariableSubstitutionEntry', '(cells/bpm85Cell|variables.xml#VariableMap_1)', '[[symbolicName "DB2_JCC_DRIVER_PATH"] [description ""] [value "${WAS_INSTALL_ROOT}/jdbcdrivers/DB2"]]')
    AdminConfig.create('VariableSubstitutionEntry', '(cells/bpm85Cell|variables.xml#VariableMap_1)', '[[symbolicName "WAS_INSTALL_ROOT"] [description ""] [value "/opt/IBM/WebSphere/AppServer"]]')
    AdminConfig.create('VariableSubstitutionEntry', '(cells/bpm85Cell|variables.xml#VariableMap_1)', '[[symbolicName "UNIVERSAL_JDBC_DRIVER_PATH"] [description ""] [value "${WAS_INSTALL_ROOT}/jdbcdrivers/DB2"]]')
    AdminConfig.create('VariableSubstitutionEntry', '(cells/bpm85Cell|variables.xml#VariableMap_1)', '[[symbolicName "PUREQUERY_PATH"] [description ""] [value ""]]')
    AdminConfig.save()
    AdminNodeManagement.syncActiveNodes()

    I've posted about this on my personal blog here: -

    http://portal2portal.blogspot.co.uk/2014/05/ibm-business-process-manager-85-long.html

    Cheers, Dave

    ReplyDelete
    Replies
    1. Hi Dave,
      look at the P.S. It's no very complicated.

      Delete