1
votes

We have an application on IBM WebSphere Application Server 7.x and it connects to a remote database on z/os DB2 10.x. For annual operation, DB2 shut down and restarted. After starting the database, we first get

com.ibm.websphere.ce.cm.StaleConnectionException

and then we get

The database manager is not able to accept new requests, has terminated all requests in progress, or has terminated this particular request due to unexpected error conditions detected at the target system. ERRORCODE=-4499, SQLSTATE=58009

The connection between WebSphere and DB2 tested by 'test Connection' in WAS datasource. Both systems are up and running but there is no correct connection between them! There was no change in DB2, WAS, and JDBC driver.

Update: The JDBC driver version is 4.15.134, connection properties is IBM WebSphere default setting and the connection is direct to DB2. Another problem later showed that while the connection still has the problem, executing the query directly on z/OS's DB2 gets the same the error. The query consist of a select with a join on two different tables, selecting on each table is ok, but the final query does not work and gets ERRORCODE=-4499, SQLSTATE=58009.

Update 2 The detail of environment is: IBM WebSphere Application Server 7.0.0.45, DB2 10.1, Java version 1.6 SR16 and z/OS 1.13.

This specific query gets the error in all environments, on all application server, z/os SPUFI, database viewer, such as DBeaver.

Any help is greatly appreciated.

2
This question is not about programming. It is better to ask this question on dba.stackexchange.com and most likely you should specify the jdbc-driver version, the connection properties, and whether direct-connection or Db2-connect is involved. - mao
You should also edit your question to specify the exact WAS version (7.x is not a specification). Since 30/April/2018, WAS 7 is no longer supported by IBM without an extended-support contract . If the versionInfo.sh tool of WAS does not show 7.0.0.45 then you should consider a migration plan. Additionally you should edit your question to state whether the issue happens with all environments or only one or some environments. Additionally specify the JVM version being used. All these basic facts can be relevant. - mao
Hi, we have a plan for migration to WAS 8.5.5.x, but not for the next few weeks. Environment details have been added to question. - Ehsan Moradi

2 Answers

3
votes

Finally, we found the solution, ran REORG and RUNSTATS on both tables and on all their partitions, and the error vanished both on the application and SPUFI. I guess something went wrong during restart and tables corrupted. Now everything is ok.

0
votes

If I got you correctly, you complain on inability of the driver to reestablish the database connections after the DB2 for Z/OS restart. If yes, then have you tried to set the corresponding connection properties described at the following link?

Configuration of Sysplex workload balancing and automatic client reroute for Java clients