Search code examples
linuxdb2websphere

How can i fix java.sql.SQLNonTransientException: java.sql.SQLNonTransientException: null DSRA0010E: SQL State = 08001, Error Code = -1,639 error


I am facing below issue while connecting to DB server(Suse linux machine B) from app Server (Suse linux machine A) which is contains WEbSphere Application Server, configured with DB2. please find below details.

ASX7015E: Exception running command: "AdminControl.testConnection('DB_NAME(cells/cell_name/nodes/node_name/servers/server1|resources.xml#dataSource_ID)')"; exception information: com.ibm.websphere.management.exception.AdminException javax.management.MBeanException java.sql.SQLNonTransientException: java.sql.SQLNonTransientException: null DSRA0010E: SQL State = 08001, Error Code = -1,639.

  1. not able to find root-cause of this error
  2. not able to find, from which server this error came.

Note : This issue came after doing some path update on production issues. WebSphere version is 9.0, using websphere internal java and openJPA 2.0 and DB2 version is 11.1.0.0.


Solution

  • The sqlode -1639 is caused by incorrect permissions on files on the Db2-server.

    See this technote

    The advice given there, in case of broken links, is:

    Cause
    
    This is caused by incorrect permissions and ownership of the following security files in ~/sqllib/security directory
    db2chpw
    db2ckpw
    
    These files should have root as owner and must have permission -r-s--x--x
    Resolving The Problem
    
    Change the owner of the files to root
    
    Change the permission of the files to -r-s--x--x
    
    Update the instance using db2iupdt
    

    Apart from the above, it is always unwise to use any "fixpack 0" of any Db2 product to production environments on linux/unix/windows. There are always too many silly bugs that have long since been fixed by subseqent cumulative fixpacks. Your question mentions v11.1.0.0 (this is fixpack 0 of Version 11.1 ). Best advice is to deploy the current most recent fixpack to the Db2-server, so get your DBA to do this first on your development/test environments before deploying to production.

    Additionally consider ensuring to maintain the Db2 jdbc driver version on your WAS server, instead of continuing to use the (usually old version) that comes with WAS. Best practice is to keep the version of the jdbc driver the same between the WAS and the Db2-server, so keep those versions maintained.