Sunday, 16 July 2017

ilog.rules.teamserver.model.IlrConnectException Caused by: java.lang.NullPointerException

As one of my many spinning threads, I've been tinkering with the migration of an IBM Operational Decision Manager (ODM) environment from version 8.0 ( circa 2012 ) to version 8.9 ( circa 2017 ).

In part, this involves running some SQL scripts to migrate the old data to the new environment.

This is especially relevant for the Decision Center, which is the Rules authoring environment, aka the Source Code Management (SCM) system-of-record.

The Decision Center, also known as the Team Server ( reflecting the product's heritage as iLog JRules ) or Rule Team Server or RTS, is based upon a database.

Therefore, the first step is to BACKUP the existing database ( RTSDB, in my case ) from the old/source system.

One benefit of the migration is that it's effectively side-by-side, meaning that you leave the old source system alone, and build a new, parallel environment into which the data ( Rules etc. ) is restored.

In my case, I'm using IBM DB2, but other databases are available.

The process is documented here: -


and here: -


and involves running a pair of Ant scripts against the existing database schema ( in my case, that's db2user1 ) resulting in a pair of SQL scripts that can then be executed against a new database schema ( in my case, that's db2user2 ) to migrate the roles AND data from one to t'other.

I was quite obviously doing something wrong, as I kept seeing exceptions such as: -

ilog.rules.teamserver.model.IlrConnectException
Caused by: java.lang.NullPointerException


in the Decision Center logs post migration.

It was, however, a PEBKAC - I was obviously doing it wrong.

Once I changed my approach: -

Restore backup of RTSDB - as db2inst1

db2 restore database RTSDB from /tmp

Connect as the instance owner - as db2inst1

db2 connect to RTSDB user db2inst1 using passw0rd

Grant the new schema - db2user2 - rights to the database - as db2inst1

db2 grant dbadm on database to user db2user2

Terminate the DB2 session - as db2inst1

db2 terminate

Connect as the new schema - as db2inst1

db2 connect to RTSDB user db2user2 using passw0rd

Run the provided script to create the necessary ODM tables, indices etc. - as db2inst1

db2 -tvf ~/rule-team-server.sql

- For the record, this SQL script is generated when one first logs into the Decision Center, so I just kept a copy :-)

Terminate the DB2 session - as db2inst1

db2 terminate

Start the Decision Centre cluster - as wasadmin

AdminControl.invoke('WebSphere:name=DecisionCenterCluster,process=dmgr,platform=common,node=Dmgr,version=8.5.5.11,type=Cluster,mbeanIdentifier=DecisionCenterCluster,cell=odmCell01,spec=1.0', 'start')

Log into the Decision Centre - as wasadmin


Follow the prompts to complete basic setup - extensions, locale ( I'm using en_GB as I'm a Brit ) etc. *BUT* avoid executing the generated SQL ( this has already been done ), as per this: -


At this stage, we've got a clean Decision Center database, ready to receive BUT with no roles or data migrated from the old environment: -


Set variables - as wasadmin

export ANT_HOME=/opt/ibm/ODM89/shared/tools/ant
export PATH=$PATH:/opt/ibm/ODM89/shared/tools/ant/bin
export JAVA_HOME=/opt/ibm/ODM89/jdk/jre


Run the Ant scripts to extract the roles and data for the old db2user1 schema - as wasadmin

cd /opt/ibm/ODM89/teamserver/bin

ant -DoldDatabaseSchemaName=db2user1 -Dserver.url=https://odm.uk.ibm.com:9443/teamserver -DrtsAdmin.login=wasadmin -DrtsAdmin.password=passw0rd -DoutputFile=/tmp/migrate_roles.sql gen-migration80-role

ant -DoldDatabaseSchemaName=db2user1 -Dserver.url=https://odm.uk.ibm.com:9443/teamserver -DdatasourceName=jdbc/ilogDataSource -DrtsAdmin.login=wasadmin -DrtsAdmin.password=passw0rd -DoutputFile=/tmp/migrate_data.sql gen-migration80-script

This results in a pair of SQL scripts: -

-rw-r--r-- 1 wasadmin wasadmins 79746 Jul 16 16:25 /tmp/migrate_data.sql
-rw-r--r-- 1 wasadmin wasadmins  9552 Jul 16 16:24 /tmp/migrate_roles.sql


Connect as the new schema - as db2inst1

db2 connect to RTSDB user db2user2 using passw0rd

Execute migration scripts - as db2inst1

db2 -tvf /tmp/migrate_roles.sql
db2 -tvf /tmp/migrate_data.sql


Terminate the DB2 session - as db2inst1

db2 terminate

Log into the Decision Centre - as wasadmin


C'est voila, we have a NEW ODM 8.9 Decision Centre with the project that was previously created on the OLD ODM 8.0 Decision Centre: -



WebSphere Application Server - Transaction Logs - getting it wrong

I do need to write a long-form article about this, but I've been on a voyage of discovery configuring AND testing WAS transaction recovery, by placing the transaction/compensation/partner logs in an Oracle 12c database.

This is in the context of an IBM Business Process Manager Advanced environment.

During the process, I saw this in the SupCluster logs ( specifically the second cluster member ) : -

SupClusterMember2/SystemOut.log:[16/07/17 11:53:47:332 BST] 00000001 WASSessionCor I SessionProperties shouldSetAndDoLogging SESN0169I: Session Manager found the custom property InvalidateOnUnauthorizedSessionRequestException with value true.
SupClusterMember2/SystemOut.log:[16/07/17 11:59:40:316 BST] 0000004d SQLMultiScope I   CWRLS0009E: Details of recovery log failure: Another server has locked the HA lock row, com.ibm.ws.recoverylog.spi.InternalLogException: Another server has locked the HA lock row
SupClusterMember2/SystemOut.log:[16/07/17 11:59:40:319 BST] 0000004d SQLMultiScope E   CWRLS0024E: Exception caught during recovery! Another server has locked the HA lock row, com.ibm.ws.recoverylog.spi.InternalLogException: Another server has locked the HA lock row
SupClusterMember2/SystemOut.log:[16/07/17 11:59:40:324 BST] 0000004d SQLMultiScope A   WTRN0107W: Caught non-SQLException Throwable when forcing SQL RecoveryLog tranlog for server PSCell1\Node2\SupClusterMember2 Throwable: Another server has locked the HA lock row, com.ibm.ws.recoverylog.spi.InternalLogException: Another server has locked the HA lock row
SupClusterMember2/SystemOut.log:[16/07/17 11:59:40:333 BST] 0000004d SQLMultiScope A   WTRN0100E: Cannot recover from SQLException when forcing SQL RecoveryLog tranlog for server PSCell1\Node2\SupClusterMember2 Exception: Another server has locked the HA lock row, com.ibm.ws.recoverylog.spi.InternalLogException: Another server has locked the HA lock row


The problem was a PEBCAK, in that I'd obviously misconfigured things.

I validated my WAS configuration: -

cat /opt/ibm/WebSphereProfiles/Dmgr01/config/cells/PSCell1/nodes/Node1/serverindex.xml | grep -i recoveryLog

    <recoveryLog xmi:id="RecoveryLog_1500062274540" transactionLogDirectory="custom://com.ibm.rls.jdbc.SQLRecoveryLog?datasource=jdbc/AppCluster_Tranlogs,tablesuffix=App1" compensationLogDirectory="custom://com.ibm.rls.jdbc.SQLRecoveryLog?datasource=jdbc/AppCluster_Tranlogs,tablesuffix=App1" compensationLogFileSize="5"/>
    <recoveryLog xmi:id="RecoveryLog_1500062279192" transactionLogDirectory="custom://com.ibm.rls.jdbc.SQLRecoveryLog?datasource=jdbc/SupCluster_Tranlogs,tablesuffix=Sup1"/>

cat /opt/ibm/WebSphereProfiles/Dmgr01/config/cells/PSCell1/nodes/Node2/serverindex.xml | grep -i recoveryLog

    <recoveryLog xmi:id="RecoveryLog_1500062274432" transactionLogDirectory="custom://com.ibm.rls.jdbc.SQLRecoveryLog?datasource=jdbc/AppCluster_Tranlogs,tablesuffix=App2" compensationLogDirectory="custom://com.ibm.rls.jdbc.SQLRecoveryLog?datasource=jdbc/AppCluster_Tranlogs,tablesuffix=App2" compensationLogFileSize="5"/>
    <recoveryLog xmi:id="RecoveryLog_1500062279152" transactionLogDirectory="custom://com.ibm.rls.jdbc.SQLRecoveryLog?datasource=jdbc/SupCluster_Tranlogs,tablesuffix=Sup2"/>


to ensure that I : -

(a) was using the right datasources for the right clusters ( AppCluster has both Transaction and Compensation logs, whereas SupCluster only has Transaction logs )
(b) had suitably incremented the suffix - App1 or Sup1 for member 1, App2 or Sup2 for member 2

Finally, as this was a TEST environment, I dropped the tables: -

DROP TABLE CMNUSER.WAS_TRAN_LOGAPP1;
DROP TABLE CMNUSER.WAS_PARTNER_LOGAPP1;
DROP TABLE CMNUSER.WAS_COMP_LOGAPP1;
DROP TABLE CMNUSER.WAS_TRAN_LOGAPP2;
DROP TABLE CMNUSER.WAS_PARTNER_LOGAPP2;
DROP TABLE CMNUSER.WAS_COMP_LOGAPP2;
DROP TABLE CMNUSER.WAS_TRAN_LOGSUP1;
DROP TABLE CMNUSER.WAS_PARTNER_LOGSUP1;
DROP TABLE CMNUSER.WAS_COMP_LOGSUP1;
DROP TABLE CMNUSER.WAS_TRAN_LOGSUP2;
DROP TABLE CMNUSER.WAS_PARTNER_LOGSUP2;
DROP TABLE CMNUSER.WAS_COMP_LOGSUP2;


and recreated them: -

CREATE TABLE CMNUSER.WAS_TRAN_LOGAPP1(
 SERVER_NAME VARCHAR(128),
 SERVICE_ID SMALLINT,
 RU_ID NUMBER(19),
 RUSECTION_ID NUMBER(19),
 RUSECTION_DATA_INDEX SMALLINT,
 DATA BLOB);

CREATE TABLE CMNUSER.WAS_PARTNER_LOGAPP1(
 SERVER_NAME VARCHAR(128),
 SERVICE_ID SMALLINT,
 RU_ID NUMBER(19),
 RUSECTION_ID NUMBER(19),
 RUSECTION_DATA_INDEX SMALLINT,
 DATA BLOB);

CREATE TABLE CMNUSER.WAS_COMP_LOGAPP1(
 SERVER_NAME VARCHAR(128),
 SERVICE_ID SMALLINT,
 RU_ID NUMBER(19),
 RUSECTION_ID NUMBER(19),
 RUSECTION_DATA_INDEX SMALLINT,
 DATA BLOB);

 CREATE TABLE CMNUSER.WAS_TRAN_LOGAPP2(
 SERVER_NAME VARCHAR(128),
 SERVICE_ID SMALLINT,
 RU_ID NUMBER(19),
 RUSECTION_ID NUMBER(19),
 RUSECTION_DATA_INDEX SMALLINT,
 DATA BLOB);

CREATE TABLE CMNUSER.WAS_PARTNER_LOGAPP2(
 SERVER_NAME VARCHAR(128),
 SERVICE_ID SMALLINT,
 RU_ID NUMBER(19),
 RUSECTION_ID NUMBER(19),
 RUSECTION_DATA_INDEX SMALLINT,
 DATA BLOB);

CREATE TABLE CMNUSER.WAS_COMP_LOGAPP2(
 SERVER_NAME VARCHAR(128),
 SERVICE_ID SMALLINT,
 RU_ID NUMBER(19),
 RUSECTION_ID NUMBER(19),
 RUSECTION_DATA_INDEX SMALLINT,
 DATA BLOB);

 CREATE TABLE CMNUSER.WAS_TRAN_LOGSUP1(
  SERVER_NAME VARCHAR(128),
  SERVICE_ID SMALLINT,
  RU_ID NUMBER(19),
  RUSECTION_ID NUMBER(19),
  RUSECTION_DATA_INDEX SMALLINT,
  DATA BLOB);

 CREATE TABLE CMNUSER.WAS_PARTNER_LOGSUP1(
  SERVER_NAME VARCHAR(128),
  SERVICE_ID SMALLINT,
  RU_ID NUMBER(19),
  RUSECTION_ID NUMBER(19),
  RUSECTION_DATA_INDEX SMALLINT,
  DATA BLOB);

 CREATE TABLE CMNUSER.WAS_COMP_LOGSUP1(
  SERVER_NAME VARCHAR(128),
  SERVICE_ID SMALLINT,
  RU_ID NUMBER(19),
  RUSECTION_ID NUMBER(19),
  RUSECTION_DATA_INDEX SMALLINT,
  DATA BLOB);

  CREATE TABLE CMNUSER.WAS_TRAN_LOGSUP2(
   SERVER_NAME VARCHAR(128),
   SERVICE_ID SMALLINT,
   RU_ID NUMBER(19),
   RUSECTION_ID NUMBER(19),
   RUSECTION_DATA_INDEX SMALLINT,
   DATA BLOB);

  CREATE TABLE CMNUSER.WAS_PARTNER_LOGSUP2(
   SERVER_NAME VARCHAR(128),
   SERVICE_ID SMALLINT,
   RU_ID NUMBER(19),
   RUSECTION_ID NUMBER(19),
   RUSECTION_DATA_INDEX SMALLINT,
   DATA BLOB);

  CREATE TABLE CMNUSER.WAS_COMP_LOGSUP2(
   SERVER_NAME VARCHAR(128),
   SERVICE_ID SMALLINT,
   RU_ID NUMBER(19),
   RUSECTION_ID NUMBER(19),
   RUSECTION_DATA_INDEX SMALLINT,
   DATA BLOB);

And all is well.

From a testing perspective, I've created a SCA module which uses a JDBC Resource Adapter to create/update/read data from an Oracle database table.

Again, that's for a future long-form article ….

XAException occurred. Error code is: XAER_RMERR (-3). Exception is:

I'm tinkering with WebSphere Application Server, underlying IBM BPM Advanced, in the context of transaction/compensation/partner log recovery.

In this scenario, I'm placing these logs into a database, Oracle 12c.

It's been a useful - and interesting - learning curve, and I've pretty much proved/tested the concept.

I did, however, see one issue today; specifically, these messages: -

[16/07/17 13:34:06:748 BST] 00000074 XARecoveryDat A   WTRN0151I: Preparing to call xa recover on XAResource: dave
[16/07/17 13:34:06:866 BST] 00000074 WSRdbXaResour E   DSRA0304E:  XAException occurred. XAException contents and details are: "".
[16/07/17 13:34:06:866 BST] 00000074 WSRdbXaResour E   DSRA0302E:  XAException occurred.  Error code is: XAER_RMERR (-3).  Exception is: <null>
[16/07/17 13:34:06:866 BST] 00000074 XARminst      E   WTRN0037W: The transaction service encountered an error on an xa_recover operation. The resource was com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl@35d8b386. The error code was XAER_RMERR. The exception stack trace follows: javax.transaction.xa.XAException
at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:727)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover(WSRdbXaResourceImpl.java:1111)
at com.ibm.ws.Transaction.JTA.XARminst.recover(XARminst.java:141)
at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:723)
at com.ibm.tx.jta.impl.PartnerLogTable.recover(PartnerLogTable.java:432)
at com.ibm.tx.jta.impl.RecoveryManager.resync(RecoveryManager.java:1544)
at com.ibm.tx.jta.impl.RecoveryManager.performResync(RecoveryManager.java:2286)
at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:119)
at com.ibm.tx.jta.impl.RecoveryManager.run(RecoveryManager.java:2239)
at java.lang.Thread.run(Thread.java:809)


appearing in the SystemOut.log for one of my cluster members - AppCluster.

This IBM Knowledge Center article: -


<snip>
Problem

When WebSphere Application Server attempts to recover Oracle database transactions, the transaction service issues the following exception:

WTRN0037W: The transaction service encountered an error on an xa_recover operation. 
The resource was com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl@1114a62. 
The error code was XAER_RMERR. The exception stack trace follows: 
javax.transaction.xa.XAException
at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:726)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover(WSRdbXaResourceImpl.java:954)
at com.ibm.ws.Transaction.JTA.XARminst.recover(XARminst.java:137)
at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:609)
at com.ibm.ws.Transaction.JTA.PartnerLogTable.recover(PartnerLogTable.java:511)
at com.ibm.ws.Transaction.JTA.RecoveryManager.resync(RecoveryManager.java:1784)
at com.ibm.ws.Transaction.JTA.RecoveryManager.run(RecoveryManager.java:2241)

Cause

Oracle requires services such as the WebSphere Application Server transaction service to have special permissions for performing transaction recoveries.

Solution

As user SYS, run the following commands on your Oracle server:

grant select on pending_trans$ to public;
grant select on dba_2pc_pending to public;
grant select on dba_pending_transactions to public;
grant execute on dbms_system to <user>;

User is a user ID in the application server that is authorized to perform transaction recovery for the XA data source. If you have not authorized any user IDs to perform transaction recovery, the application server uses the login alias for the data source as the user ID.
This problem is mentioned under Oracle bug: 3979190. Running the preceding commands solves the problem.
</snip>

Following the KC article, I updated the Oracle DB permissions: -

sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sun Jul 16 13:20:39 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production


grant select on pending_trans$ to public;

Grant succeeded.

grant select on dba_2pc_pending to public;

Grant succeeded.

grant select on dba_pending_transactions to public;

Grant succeeded.

grant execute on dbms_system to cmnuser;

Grant succeeded.

and then restarted the AppCluster.

Let's see how it goes, but it's looking good so far.

Friday, 14 July 2017

TypeError: __add__ nor __radd__ defined for these operands

Whilst scripting the configuration of the WebSphere Application Server transaction/compensation/partner logs into an Oracle database: -

/opt/ibm/WebSphereProfiles/Dmgr01/bin/wsadmin.sh -lang jython -user wasadmin -password passw0rd -f tranlogs.jy 

I saw this: -

WASX7209I: Connected to process "dmgr" on node Dmgr using SOAP connector;  The type of process is: DeploymentManager
WASX7017E: Exception received while running file "tranlogs.jy"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<string>", line 18, in ?
TypeError: __add__ nor __radd__ defined for these operands


Last time I saw this error ( 2012 ), it was user error.

I checked my script ( specifically line 18 as per the exception ) : -

datasource=AdminTask.createDatasource(provider, '[-name '+clusterName+'_Tranlogs -jndiName jdbc/'+clusterName+'_Tranlogs -dataStoreHelperClassName com.ibm.websphere.rsadapter.Oracle11gDataStoreHelper -containerManagedPersistence true -componentManagedAuthenticationAlias '+j2cAlias+' -configureResourceProperties [[URL java.lang.String jdbc:oracle:thin:@//'+dbHost+':'+dbPort+'/'+dbName+']]]')

Looking at the concatenation of three strings ( dbHost, dbPort and dbName ) gave me a clue, and I checked the variables, and found: -

dbPort=1521

In other words, I'd defined it as an integer whereas Jython was expected a string.

Once I changed it: -

dbPort='1521'

the script ran without errors.

CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/TeamWorksDB

This follows on from an earlier post: -


Having updated my JDBC data sources to reflect the correct Oracle service name: -


I'm now seeing the following warning: -

[14/07/17 20:07:17:855 BST] 000000f5 ConfigReader  W com.ibm.bpm.config.util.ws.ConfigReader getDatabaseInfo CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/TeamWorksDB. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.

in the SystemOut.log for the AppCluster members.

The IBM BPM Knowledge Center has a solution: -

CWMCB0012W   An inconsistent configuration has been detected for data source 0. It is assumed that the correct Oracle service name or SID is 1 rather than 2.

Explanation

An IBM BPM data source has been manually modified rather than updated using the "BPMConfig -update -dataSource" command. The resulting configuration is inconsistent.
User response

Export the IBM BPM deployment environment configuration and fix the data source configuration by running the "BPMConfig -update -dataSource" command.

Following the advice therein, I exported the BPM configuration: -

/opt/ibm/WebSphere/AppServer/bin/BPMConfig.sh -export -profile Dmgr01 -de De1 -outputDir /tmp/De1

Logging to file /opt/ibm/WebSphere/AppServer/logs/config/BPMConfig_20170714-203920.log.
CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/WPSDB. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.
CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/ECMDBXA. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.
CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/CommonDB. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.
CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/BPEDB. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.
CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/ECMDB. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.
CWMCB0012W: An inconsistent configuration has been detected for data source jdbc/SharedDb. It is assumed that the correct Oracle service name or SID is orcl.uk.ibm.com rather than orcl.
The 'BPMConfig.sh -export -profile Dmgr01 -de De1 -outputDir /tmp/De1' command completed successfully.

and then updated the Data Source configuration: -

/opt/ibm/WebSphere/AppServer/bin/BPMConfig.sh -update -dataSource /tmp/De1/De1.properties 

Logging to file /opt/ibm/WebSphere/AppServer/logs/config/BPMConfig_20170714-204136.log.
Saving configuration changes...
The 'BPMConfig.sh -update -dataSource /tmp/De1/De1.properties' command completed successfully.


and then re-exported the configuration to check that all was good: -

/opt/ibm/WebSphere/AppServer/bin/BPMConfig.sh -export -profile Dmgr01 -de De1 -outputDir /tmp/Foobar

Logging to file /opt/ibm/WebSphere/AppServer/logs/config/BPMConfig_20170714-204220.log.
The 'BPMConfig.sh -export -profile Dmgr01 -de De1 -outputDir /tmp/Foobar' command completed successfully.


So that's all good then :-)

IBM BPM - "CWSCA8095W: Unable to find class..." seen during serviceDeploy process

I'm tinkering with IBM BPM Advanced again, specifically taking an export of an SCA module, built using IBM Integration Designer and exported as a Project Interchange (PI) file, and attempting to "compile" it ready for deploying to an external IBM BPM 8.57 environment.

Having exported the PI file, and made it available to the BPM box, I then ran serviceDeploy.sh against it: -

/opt/ibm/WebSphere/AppServer/bin/serviceDeploy.sh OracleTest.zip 

which returned: -

The workbench is starting in /home/wasadmin/15d428ea0a1.
The workspace is initializing.
OracleTest.zip was successfully imported into the workspace.
The OracleTestApp project is being created.
The OracleTestWeb project is being created.
The OracleTest project is building.
OracleTest is being validated.

The following 36 warning messages were reported during deployment:

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.jdbc.JDBCInteractionSpec, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.jdbc.JDBCInteractionSpec, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.jdbc.JDBCInteractionSpec, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultSelectorImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8085W: The fault selector of com.ibm.j2ca.extension.emd.runtime.WBIFaultSelectorImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.MatchingFaultDataBinding, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.MatchingFaultDataBinding type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.MatchingFaultDataBinding, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.MatchingFaultDataBinding type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA9537W: The fault binding of com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.jdbc.JDBCManagedConnectionFactory, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8043W: com.ibm.j2ca.jdbc.JDBCManagedConnectionFactory cannot be validated.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8095W: Unable to find class com.ibm.j2ca.jdbc.JDBCResourceAdapter, please make sure the class path is properly set up.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  CWSCA8082E: The resource adapter of the com.ibm.j2ca.jdbc.JDBCResourceAdapter type is missing in the class path or in the dependencies.
Resource:  toAndFromOracle.import
Location:        

Severity:  [warning]
Description:  XSD: The location 'JDBCASI.xsd' has not been resolved
Resource:  DaveConsultant.xsd
Location:       1


The OracleTestApp.ear application is being exported.
Deployment has completed.
The workspace is being deleted.


Now I've definitely done this before ….

… but, this time around, I'm also using a JDBC Resource Adapter (RA) as evidenced by the messages e.g.

CWSCA8082E: The resource adapter of the com.ibm.j2ca.jdbc.JDBCResourceAdapter type is missing in the class path or in the dependencies.

This provided a clue.

Next time around, I exported BOTH the SCA module AND the dependent project that contains the JDBC Resource Adapter code ( this was created for me when I dragged a JDBC Adapter component into my Assembly Diagram : -


For the record, this was the PI file first time around: -

-rwxr-xr-x   1 wasadmin wasadmins   31538 Jul 14 20:23 OracleTest.zip

and this was the version the second time around: -

-rwxr-xr-x   1 wasadmin wasadmins 5747285 Jul 14 20:30 OracleTest.zip

It looks slightly more podgy because it contains the RA code.

More importantly, the "compilation" process worked a treat: -

The workbench is starting in /home/wasadmin/15d42955f45.
The workspace is initializing.
OracleTest.zip was successfully imported into the workspace.
The OracleTestApp project is being created.
The OracleTestWeb project is being created.
The OracleTest project is building.
OracleTest is being validated.
The OracleTestApp.ear application is being exported.
Deployment has completed.
The workspace is being deleted.



java.sql.SQLException: Could not commit with auto-commit set on

I saw this earlier: -

[14/07/17 20:00:02:593 BST]     FFDC Exception:java.sql.SQLException SourceId:com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.commit ProbeId:587 Reporter:com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@964a1c09
java.sql.SQLException: Could not commit with auto-commit set on

in the FFDC logs for an IBM BPM 8.57 JVM: -

view /opt/ibm/WebSphereProfiles/AppSrv01/logs/ffdc/AppClusterMember1_72d880eb_17.07.14_20.00.02.5935101433318572951378.txt 

I am using Oracle 12c ( specifically 12.2.0.1.0  )

and am using the version of the Oracle JDBC drivers that ship with WAS 8.5.5.11: -

ls -altrc /opt/ibm/WebSphere/AppServer/jdbcdrivers/Oracle/

total 6632
-rw-r--r-- 1 wasadmin wasadmins 3389454 Jul 10 19:59 ojdbc6.jar
drwxr-xr-x 5 wasadmin wasadmins      45 Jul 10 19:59 ..
drwxr-xr-x 2 wasadmin wasadmins      40 Jul 10 19:59 .
-rw-r--r-- 1 wasadmin wasadmins 3397734 Jul 10 19:59 ojdbc7.jar


specifically: -

/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/bin/java -jar /opt/ibm/WebSphere/AppServer/jdbcdrivers/Oracle/ojdbc6.jar -getversion

Oracle 12.1.0.1.0 JDBC 4.0 compiled with JDK6 on Thu_Apr_04_15:06:58_PDT_2013
#Default Connection Properties Resource
#Fri Jul 14 20:11:21 BST 2017


Source: Checking the Oracle JDBC Driver Version on a Weblogic Server

Thankfully, this IBM developerWorks Answers ( dwAnswers ) page: -


provides an answer: -

This kind of exceptions occur when the Oracle JDBC Driver (ojdbc6.jar) version 12 or above will be used. Version 12 and above of the driver is more strictly than earlier driver versions. You can solve the problem, by setting the jvm-argument:

•  -Doracle.jdbc.autoCommitSpecCompliant=false
on all affected servers.

as does this IBM Technote: -


Once I added the JVM property, and restarted the AppCluster, all was well.

For the record, this is what I now have in server.xml in the context of JVM arguments: -

    <jvmEntries xmi:id="JavaVirtualMachine_1499716654178" verboseModeClass="false" verboseModeGarbageCollection="true" verboseModeJNI="false" initialHeapSize="1536" maximumHeapSize="2560" runHProf="false" hprofArguments="" debugMode="false" debugArgs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="${IBMSCMX} ${IBMGCPOLICY_GENCON} ${IBMJITPMC} -Xmns256m -Xmnx768m -Xgc:preferredHeapBase=0x100000000 -Xdisableexplicitgc -Xss2048k -Dsun.net.http.allowRestrictedHeaders=true -Declipse.bundle.setTCCL=false  -Doracle.jdbc.autoCommitSpecCompliant=false" executableJarFileName="" disableJIT="false">

and, via the GUI: -