sampath sam - 2009-09-11

Hi,

       We are using SQL Server 2005 SP2 with Hibernate, JTDS 1.2.2 JDBC Driver and Sun Application Server. We have a clustered environment in the application server. One of the servers in the cluster is working fine, but the other server is not able to connect to the database and is throwing the following exception. Please let me know if any of you have seen the error before or any solution to fix it. Your help is greatly appreciated.

   05 Sep 2009 16:47:25,250  WARN httpSSLWorkerThread-80-0 AbstractBatcher:318 - Could not close a JDBC result set
    java.sql.SQLException: TDS Protocol error: Invalid packet type 0x11
            at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2314)
            at net.sourceforge.jtds.jdbc.TdsCore.getNextRow(TdsCore.java:764)
            at net.sourceforge.jtds.jdbc.JtdsResultSet.next(JtdsResultSet.java:593)
            at net.sourceforge.jtds.jdbc.JtdsResultSet.close(JtdsResultSet.java:486)
            at org.hibernate.jdbc.AbstractBatcher.closeStatements(AbstractBatcher.java:314)
            at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:382)
            at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:324)
            at org.hibernate.impl.SessionImpl.close(SessionImpl.java:298)
            at org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession(SessionFactoryUtils.java:774)
            at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.closeSession(OpenSessionInViewFilter.java:280)

Caused by: net.sourceforge.jtds.jdbc.ProtocolException: Invalid packet type 0x11
            at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2301)
            ... 43 more

05 Sep 2009 16:47:25,250  WARN httpSSLWorkerThread-80-0 AbstractBatcher:280 - exception clearing maxRows/queryTimeout
java.sql.SQLException: "Connection has been returned to pool and this reference is no longer valid.
            at net.sourceforge.jtds.jdbcx.proxy.StatementProxy.validateConnection(StatementProxy.java:688)
            at net.sourceforge.jtds.jdbcx.proxy.StatementProxy.getMaxRows(StatementProxy.java:134)
            at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:276)
            at org.hibernate.jdbc.AbstractBatcher.closeStatements(AbstractBatcher.java:330)
            at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:382)
            at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:324)
            at org.hibernate.impl.SessionImpl.close(SessionImpl.java:298)
            at org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession(SessionFactoryUtils.java:774)

Thanks,
Sampath