Bootstrap FreeKB - IBM WebSphere - Resolve "Connection not available while invoking method"
IBM WebSphere - Resolve "Connection not available while invoking method"

Updated:   |  IBM WebSphere articles

Let's say the following is in the HPEL or SystemOut log when attempting to start your WebSphere network deployment manager (dmgr), node, or application server.

[5/14/18 22:09:03:340 CDT] 000000fcc FreePool E J2CA0045E: Connection not available while invoking method example for resource /path/to/resource


This error suggests some issue connecting to a database, such as DB2, Oracle, or MySQL. For example, there may be latency in the response from the database (possibly due to a semaphore timeout), which produces the above error and other related errors in the JVM logs. Before doing any troubleshooting on the WebSphere side, check on the database side, to see if there is indeed some issue with the database. Since this issues is due to some issues with the connection to the database, it is unlikely that restarting the application or restarting the JVM will resolve the issue.

If no problems can be found with the database, the following can be done to capture data that will help in the analysis of this issue. Restart the application, and then immediately do the following steps, to ensure the tracing is enabled before the application makes a connection to the database.

  1. In the WebSphere admin console, expand Troubleshooting and select Logs and trace.
  2. Select your server.
  3. Select Diagnostics trace.
  4. Select the Runtime tab.
  5. Select Change log level detail.
  6. Select the Runtime tab.
  7. In the Trace Specification field, enter ConnLeakLogic=enabled.
  8. Select OK.

Watch the SystemOut.log. If J2CA0045E continues to appear, issue the following wsadmin command.

wsadmin -c "$AdminControl invoke [$AdminControl queryNames \"*:name=<your datasource name>,process=<SERVER NAME>,node=<NODE NAME>,j2eeType=JDBCDataSource,*\"] showPoolContents" -user <admin username> -password <admin pasword>


Maximum connections

By default, a data source is configured to have 10 maximum connections. If you determine that more than 10 connections to the data source are needed, increase the maximum connections.


Prepared statements

By default, a data source is configured to cache 10 prepared statements. If you determine that more than 10 prepared statements need to cached, update the data source to cache more than 10 prepared statements.

Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee


Add a Comment

Please enter e50a79 in the box below so that we can be sure you are a human.