Resolve "J2CA0045E Connection not available while invoking method" in WebSphere

Home > Search
  by

This error appears in a JVMs SystemOut.log.

[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 left panel of 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>

 

More tbd.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments