Solved

We are getting a 'Connection is already closed' exception from WebSphere 5 and jConnect 5.5

Posted on 2004-03-25
3
605 Views
Last Modified: 2013-12-10
We have an web application that uses a Sybase/JDBC Datasource.  We are utilziing the standard connection pooling provided by WebSphere 5 and the jConnect JDBC provider.  We are experiencing intermittent SqlExceptions "JZ0C0: Connection is already closed." when attempting to use connections returned from the Datasource.  We're fairly confident we are dutifully closing all of our statements, result sets and connections when we are done using them.  It is our understanding that when we close a connection, it is returned to the connection pool and is available for further use.

This appears to work properly most of the time.  We have not been able to reproduce it reliably.

-jon
0
Comment
Question by:jonprettyman
3 Comments
 
LVL 9

Accepted Solution

by:
mmuruganandam earned 250 total points
ID: 10877123
Make sure that all your connections are closed in the finally block of all your code.  There are chances that your connection might be closed based on one data condition and try to use the same connection in the same block for some other reason.

It is purely a code bug.


Regards,
Muruga
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Weblogic Logs 4 152
Java Uncaught Exception 5 248
method reurn 7 85
Using Tomcat as raspberry pi java app server 13 189
Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question