Tuesday, 30 October 2018

WebSphere Application Server - TIOAOA

So I saw this: -

[30/10/18 12:49:51:057 GMT] 00000125 MBeanHelper   E   Could not invoke an operation on object: WebSphere:name=DataSourceCfgHelper,process=dmgr,platform=dynamicproxy,node=Dmgr,version=8.5.5.14,type=DataSourceCfgHelper,mbeanIdentifier=DataSourceCfgHelper,cell=workflowCell01,spec=1.0 because of an mbean exception: java.sql.SQLException: [jcc][t4][10262][11223][4.24.92] Unexpected Throwable caught: Class com/ibm/db2/jcc/t4/a illegally accessing "package private" member of class com/ibm/db2/jcc/t4/m. ERRORCODE=-4228, SQLSTATE=null DSRA0010E: SQL State = null, Error Code = -4,228

[30/10/18 12:50:23:130 GMT] 00000125 DSConfigurati W   DSRA8201W: DataSource Configuration: DSRA8040I: Failed to connect to the DataSource jdbc/ilogDataSource.  Encountered java.sql.SQLException: [jcc][t4][10262][11223][4.24.92] Unexpected Throwable caught: Class com/ibm/db2/jcc/t4/a illegally accessing "package private" member of class com/ibm/db2/jcc/t4/m. ERRORCODE=-4228, SQLSTATE=null DSRA0010E: SQL State = null, Error Code = -4,228.
java.sql.SQLException: [jcc][t4][10262][11223][4.24.92] Unexpected Throwable caught: Class com/ibm/db2/jcc/t4/a illegally accessing "package private" member of class com/ibm/db2/jcc/t4/m. ERRORCODE=-4228, SQLSTATE=null DSRA0010E: SQL State = null, Error Code = -4,228


whilst attempting to test a newly-minted JDBC data source on an equally newly-minted WAS ND 8.5.5.14 / DB2 11.1.3.3  environment.

I spent an age looking at the JDBC provider: -


which I had created using Jython: -

provider=AdminTask.createJDBCProvider('[-scope Cell='+cellID+' -databaseType DB2 -providerType "DB2 Using IBM JCC Driver" -implementationType "XA data source" -name "DB2 Using IBM JCC Driver (XA)" -classpath [${DB2_JCC_DRIVER_PATH}/db2jcc4.jar ${DB2_JCC_DRIVER_PATH}/db2jcc_license_cu.jar ] -nativePath [${DB2_JCC_DRIVER_NATIVEPATH} ] ]')

I also checked out the class path: -

ls -al /opt/ibm/WebSphere/AppServer/universalDriver/lib/

total 4140
drwxr-xr-x 2 wasadmin wasadmins      52 Oct 30 11:33 .
drwxr-xr-x 3 wasadmin wasadmins      16 Oct 30 08:18 ..
-r--r--r-- 1 wasadmin wasadmins 4234170 Oct 30 11:33 db2jcc4.jar
-rw-r--r-- 1 wasadmin wasadmins    1529 Oct 30 13:08 db2jcc_license_cu.jar


comparing it to what DB2 provides: -

ls -al /opt/ibm/db2/V11.1/java/

total 13012
drwxr-xr-x.  3 bin  bin     4096 Mar  3  2018 .
drwxr-xr-x. 42 root root    4096 Sep 20 10:56 ..
-rw-rw-rw-.  1 root root     169 Sep 20 10:55 42E32181339E47B2BF8145FD26612E69.properties
-r--r--r--.  1 bin  bin  2290737 Mar  3  2018 Common.jar
-r--r--r--.  1 bin  bin     1637 Mar  3  2018 db2c2c.jar
-r--r--r--.  1 bin  bin    75300 Mar  3  2018 db2dbgm.jar
-r--r--r--.  1 bin  bin    48203 Mar  3  2018 db2ext.jar
-r--r--r--.  1 bin  bin  1182501 Mar  3  2018 db2java.zip
-r--r--r--.  1 bin  bin  4234170 Mar  3  2018 db2jcc4.jar
-r--r--r--.  1 bin  bin  3813641 Mar  3  2018 db2jcc.jar
-r--r--r--.  1 bin  bin     1529 Mar  3  2018 db2jcc_license_cu.jar
-r--r--r--.  1 bin  bin   122830 Mar  3  2018 db2policy.jar
-r--r--r--.  1 bin  bin     7786 Mar  3  2018 db2qgjdbc.jar
-r--r--r--.  1 bin  bin     9455 Mar  3  2018 db2umplugin.jar
-r--r--r--.  1 bin  bin   618901 Mar  3  2018 ib6core.jar
-r--r--r--.  1 bin  bin    32637 Mar  3  2018 ib6extra.jar
-r--r--r--.  1 bin  bin   297505 Mar  3  2018 ib6js.jar
-r--r--r--.  1 bin  bin    74756 Mar  3  2018 ib6swing.jar
-r--r--r--.  1 bin  bin   103344 Mar  3  2018 ib6util.jar
-r--r--r--.  1 bin  bin     4859 Mar  3  2018 IBMUpdateUtil.jar
-r--r--r--.  1 bin  bin       59 Mar  3  2018 IBMUpdateUtil.prop
drwxr-xr-x.  7 bin  bin     4096 Mar  3  2018 jdk64
-r--r--r--.  1 bin  bin   347851 Mar  3  2018 us.jar


but to no avail.

And then I thought … have you tried TIOAOA ?

So I did….

And it worked.

For the benefit of others, the TIOAOA abbreviation / anagram comes from The IT Crowd: -


in which a common theme is "Have you tried turning it off and on again?"

:-) 

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...