This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Software caused connection abort: recv failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Software caused connection abort: recv failed" Watch "Software caused connection abort: recv failed" New topic
Author

Software caused connection abort: recv failed

Kevin G Scott
Greenhorn

Joined: Jan 24, 2005
Posts: 17
Hello all,
I have a Web Service that uses a datasource from my J2EE container. I had a very strange error this morning. The first error that I received was like this:
java.sql.SQLException: Io exception: Software caused connection abort: recv failed
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:286)
at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:497)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1109)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1560)
at com.evermind.sql.FilterStatement.executeUpdate(FilterStatement.java:61)
at com.evermind.sql.FilterStatement.executeUpdate(FilterStatement.java:61)
at com.evermind.sql.StatementBCELProxy.executeUpdate(StatementBCELProxy.java:53)

After this error occurs, every request that tries to pull a connection from the pool receives the following error when it tries to use the connection:
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:239)
at oracle.jdbc.driver.PhysicalConnection.createStatement(PhysicalConnection.java:728)
at oracle.jdbc.driver.PhysicalConnection.createStatement(PhysicalConnection.java:702)
at com.evermind.sql.FilterConnection.createStatement(FilterConnection.java:279)
at com.evermind.sql.FilterConnection.createStatement(FilterConnection.java:279)
at com.evermind.sql.ConnectionBCELProxy.createStatement(ConnectionBCELProxy.java:40)

I restarted the container to refresh the Datasources, and that seems to have resolved the issue, but I want to ensure that It doesn't occur again. Does anyone have any ideas what could have caused this issue?

Thanks in advance!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Kevin,
That is typically caused when a connection gets stale or closes after a timeout. The DataSource doesn't know it is stale until you use it. Usually, if you code to try again, it will work. Alternatively, you can keep pinging your application to prevent the connection from getting stale in the first place.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Software caused connection abort: recv failed
 
Similar Threads
The Network Adapter could not establish the connection Error Code: 17002
JDBC connection issue with RAC database
java.sql.SQLException: Io exception: Software caused connection abort: recv failed
java.sql.SQLException: Closed Connection
Problem getting DB Connection from Datasource in OpenEJB