Mysteriously closed connection

While deploying our product to our stage environment, we found a “glitch” with our Java webapp. We’re using Tomcat 5.0.27, Hibernate 2.1.7c, RHEL 4 and Oracle. I’m seeing this wonderful error:



WARN  net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 17008, SQLState: null
ERROR net.sf.hibernate.util.JDBCExceptionReporter - Closed Connection


Followed by:


ERROR com.mycompany.SomeObjectFactory - HibernateException trying to commit: com.mycompany.SomeObjectImpl
net.sf.hibernate.exception.GenericJDBCException: Could not save object
...
Caused by: java.sql.SQLException: Closed Connection
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Compiled Code))
...



I’ve looked through the code and used a logging jdbc driver (which wraps the actually jdbc driver
and logs statements for certain objects.) to log the Connection. No close() method was called. So
from what I can gather our application isn’t closing it by accident. But I can’t figure out what
is closing the connection.

I’ve already checked Oracle and it is not set to close idle connections.
Checked the router between the DB and the application box.
The closest I can fathom is the kernel’s tcp_keepalive_time which is set to 7200 (which is approximately
when we see the above error occur).

We’ll continue our investigation, but this is indeed a perplexing problem.

Migrating to Hibernate 3

We seem to have had some good success with Hibernate 2.1. Though I’ve been excited about migrating to Hibernate 3 in our next release. I’m beginning to plan our migration strategy, and some of the things we can refactor to take advantage of the new things in Hibernate 3.

And for those of you new to Hibernate, don’t forget to check out Hibernate in Action which was our guide through our Hibernate development. Now I need a Hibernate 3 book.

Vonage

I’ve had Vonage for several months as a second line to try out VoIP. On June 8th, I decided to make the commitment and started my number transfer. Typically it takes 20 days, but my current landline provider was dragging their feet, so much for being a Sprinter.

Well today 8/2/05, my number transfer has been completed. And I can get rid of my ridiculously priced landline.

If you’re thinking of going VoIP, give Vonage a try.