So, on a newly minted IBM BPM Advanced 8.5.0.1 installation, I noticed that some of the JDBC datasources that are created when I generate the Deployment Environment using the BPMConfig command: -
/opt/IBM/WebSphere/AppServer/bin/BPMConfig.sh -create -de BPM85Advanced.properties fail to connect, via the Test Connection button within the WAS Integrated Solutions Console (ISC).
This is what I see: -
specifically: -
The test connection operation failed for data source BPM CellScopedDB data source on server dmgr at node bpm85Node1 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable DB2_JCC_DRIVER_PATH. View JVM logs for further details.
and: -
The test connection operation failed for data source BPM ESBMediationDB data source on server dmgr at node bpm85Node1 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable DB2_JCC_DRIVER_PATH. View JVM logs for further details.
Looking in the Deployment Manager's SystemOut.log ( in /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr ), I see: -
[16/05/14 17:19:16:830 BST] 000000f6 DataSourceCon E DSRA8040I: Failed to connect to the DataSource. Encountered "": com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable DB2_JCC_DRIVER_PATH
[16/05/14 17:19:17:032 BST] 000000f6 MBeanHelper E Could not invoke an operation on object: WebSphere:name=DataSourceCfgHelper,process=dmgr,platform=dynamicproxy,node=bpm85Node1,version=8.5.5.1,type=DataSourceCfgHelper,mbeanIdentifier=DataSourceCfgHelper,cell=bpm85Cell,spec=1.0 because of an mbean exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable DB2_JCC_DRIVER_PATH
Interestingly, it's only the two cell-scoped data sources that have the issue: -
I have a number of instances of the JDBC Provider: -
only one of which is scoped at the cell level: -
which has two references to the variable DB2_JCC_DRIVER_PATH: -
${DB2_JCC_DRIVER_PATH}/db2jcc4.jar
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2_JCC_DRIVER_PATH}/db2jcc_license_cisuz.jar
${PUREQUERY_PATH}/pdq.jar
${PUREQUERY_PATH}/pdqmgmt.jar
I only have two instances of this WebSphere Variable: -
neither of which are scoped at the cell level.
I quickly resolved this: -
/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.save()
AdminNodeManagement.syncActiveNodes()
Sadly this moved me forward, but didn't fully fix the problem.
This is what I now see: -
The test connection operation failed for data source BPM CellScopedDB data source on server dmgr at node bpm85Node1 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 BPM ESBMediationDB data source on server dmgr at node bpm85Node1 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable WAS_INSTALL_ROOT. View JVM logs for further details.
with: -
[16/05/14 18:55:32:539 BST] 00000131 MBeanHelper E Could not invoke an operation on object: WebSphere:name=DataSourceCfgHelper,process=dmgr,platform=dynamicproxy,node=bpm85Node1,version=8.5.5.1,type=DataSourceCfgHelper,mbeanIdentifier=DataSourceCfgHelper,cell=bpm85Cell,spec=1.0 because of an mbean exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable WAS_INSTALL_ROOT
[16/05/14 18:55:33:260 BST] 00000131 DataSourceCon E DSRA8040I: Failed to connect to the DataSource. Encountered "": com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable WAS_INSTALL_ROOT
in SystemOut.log.
Again, this is a problem with a missing WebSphere Variable - WAS_INSTALL_ROOT - which isn't available
Again, this is easily fixed: -
/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 "WAS_INSTALL_ROOT"] [description ""] [value "/opt/IBM/WebSphere/AppServer"]]')
AdminConfig.save()
AdminNodeManagement.syncActiveNodes()
Am I out of the woods yet ?
Nope: -
The test connection operation failed for data source BPM CellScopedDB data source on server dmgr at node bpm85Node1 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable UNIVERSAL_JDBC_DRIVER_PATH. View JVM logs for further details.
The test connection operation failed for data source BPM ESBMediationDB data source on server dmgr at node bpm85Node1 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable UNIVERSAL_JDBC_DRIVER_PATH. View JVM logs for further details.
and: -
[16/05/14 19:10:41:888 BST] 00000142 MBeanHelper E Could not invoke an operation on object: WebSphere:name=DataSourceCfgHelper,process=dmgr,platform=dynamicproxy,node=bpm85Node1,version=8.5.5.1,type=DataSourceCfgHelper,mbeanIdentifier=DataSourceCfgHelper,cell=bpm85Cell,spec=1.0 because of an mbean exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable UNIVERSAL_JDBC_DRIVER_PATH
[16/05/14 19:10:42:989 BST] 00000142 DataSourceCon E DSRA8040I: Failed to connect to the DataSource. Encountered "": com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable UNIVERSAL_JDBC_DRIVER_PATH
in SystemOut.log.
Yet again: -
Again, I have a script for that: -
/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 "UNIVERSAL_JDBC_DRIVER_PATH"] [description ""] [value "${WAS_INSTALL_ROOT}/jdbcdrivers/DB2"]]')
AdminConfig.save()
AdminNodeManagement.syncActiveNodes()
with: -
The test connection operation failed for data source BPM CellScopedDB data source on server dmgr at node bpm85Node1 with the following exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable PUREQUERY_PATH. View JVM logs for further details.
[16/05/14 19:15:32:302 BST] 00000142 MBeanHelper E Could not invoke an operation on object: WebSphere:name=DataSourceCfgHelper,process=dmgr,platform=dynamicproxy,node=bpm85Node1,version=8.5.5.1,type=DataSourceCfgHelper,mbeanIdentifier=DataSourceCfgHelper,cell=bpm85Cell,spec=1.0 because of an mbean exception: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable PUREQUERY_PATH
etc.
This is getting boring now.
Interestingly, the PUREQUERY_PATH variable does exist at the node level, but has no value: -
/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 "PUREQUERY_PATH"] [description ""] [value ""]]')
AdminConfig.save()
AdminNodeManagement.syncActiveNodes()
And ....
So, the long story short .... the two cell-scoped JDBC datasources - BPM CellScopedDB data source and BPM ESBMediationDB data source - are created with regard to variables: -
${DB2_JCC_DRIVER_PATH}/db2jcc4.jar
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2_JCC_DRIVER_PATH}/db2jcc_license_cisuz.jar
${PUREQUERY_PATH}/pdq.jar
${PUREQUERY_PATH}/pdqmgmt.jar
none of which exist at the cell-scoped level :-)
Next time around, this is how I'll fix the problem in one fell swoop: -
/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()
next time around.