3 Replies Latest reply on Jun 7, 2004 1:47 PM by aloubyansky

    Sybase DataSource, Connection Already closed

    ophis

      Hi all,

      I am getting the following exceptions when trying to creat an Entity bean. Here is the stack trace :

      10:57:39,854 WARN [JBossManagedConnectionPool] Exception destroying ManagedConnection
      org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: JZ0C0: Connection is already closed.)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:546)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:252)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:502)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:326)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:508)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:436)


      I am currently having a problem with the Sybase datasource that i am using. On deployment of the .ear file it connects to the DB creates the tables with no exceptions. I can also get a handle to it through jndi and execute an sql query again with no problems.

      The error is caused by the "java.sql.SQLException: JZ0C0: Connection is already closed" exception.

      Does anyone know what might be causing this.

      Here is the text of my sybase-ds.xml maybe i am missing something.


      <local-tx-datasource>
      <jndi-name>jdbc/HylafaxDB</jndi-name>
      <connection-url>jdbc:sybase:Tds:DBMS52:5000/hylafax?JCONNECT_VERSION=6</connection-url>
      <driver-class>com.sybase.jdbc2.jdbc.SybDriver</driver-class>
      <user-name>user<user-name>
      pas
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>10</idle-timeout-minutes>
      <blocking-timout-millis>10000</blocking-timout-millis>
      <track-statements>true</track-statements>

      </local-tx-datasource>