Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4911

MSSQLValidConnectionChecker throws exception with MS SQL Server 2005 JDBC driver

    XMLWordPrintable

Details

    Description

      After installing the latest v1.2 version of the MS SQL Server 2005 JDBC driver (http://msdn2.microsoft.com/en-us/data/aa937724.aspx), I've deployed the following datasource

      <datasources>
      <local-tx-datasource>
      <jndi-name>DefaultDS</jndi-name>
      <connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=pubs</connection-url>
      <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
      <user-name>sa</user-name>
      <password>jboss</password>
      <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MSSQLValidConnectionChecker</valid-connection-checker-class-name>

      <metadata>
      <type-mapping>MS SQLSERVER2000</type-mapping>
      </metadata>
      </local-tx-datasource>
      </datasources>

      during start-up, the following exception is throwed

      2007-10-25 11:26:36,312 DEBUG [org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory] Starting jboss:service=KeyGeneratorFactory,type=HiLo
      2007-10-25 11:26:36,328 WARN [org.jboss.resource.adapter.jdbc.vendor.MSSQLValidConnectionChecker] warning: connection validation failed for current managed connection.
      2007-10-25 11:26:36,328 WARN [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Destroying connection that is not valid, due to the following exception: com.microsoft.sqlserver.jdbc.SQLServerConnection@9a42ef
      com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'x'.
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Unknown Source)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
      at org.jboss.resource.adapter.jdbc.vendor.MSSQLValidConnectionChecker.isValidConnection(MSSQLValidConnectionChecker.java:54)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:445)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:231)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:200)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:211)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)

      IMPORTANT NOTE: I've been testing against MSSQL Server 2000. This issue might very well not exist at all with MS SQL Server 2005...

      Attachments

        Issue Links

          Activity

            People

              jeff.zhang_jira Jeff Zhang (Inactive)
              luc.texier Luc Texier (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: