0 Replies Latest reply on Jan 22, 2004 3:49 PM by jcprout

    Logical handle is no longer valid from an Oracle Connection

    jcprout

       

      "jcprout" wrote:
      I am in the process of porting a weblogic J2EE application to Jboss 3.2.3 (running on Redhat Linux 9 and using Oracle 9i)

      There's one place in the application, during a long series of database queries, where my connection pool gives up, so that every time I try to execute a query, on a connection from the pool, I get a SQLException "Logical Handle is no longer valid". Once I get that exception I can't do anything with any connection from the pool - all return the same error until Jboss is restarted.

      What I've found about the error is that first, it's an ORA-17073 from the Oracle JDBC driver. This happens when the Logical JDBC Connection returned from the Connection Pool is using an invalid (closed) physical connection to Oracle.

      What I think might be behind the error is that we don't have any connection re-use. Every query that's executed (they're all PreparedStatement s) gets a connection from the pool, then closes it when it's finished. Seems like this is at least inefficient, but is it causing this error? It would be a huge effort to re-write this, so I can't do that without some clear evidence it's the problem!

      One advantage of getting a new connection for every query is that it's easy to be sure that all connections are closed, and I know that I'm not using a closed connection

      Does anyone know anything about this error? Any ideas what I can do to fix it or work around it?

      Thanks in advance

      John