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

    Details

    • Similar Issues:
      Show 9 results 

      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...

        Gliffy Diagrams

          Issue Links

            Activity

            Luc Texier created issue -
            Luc Texier made changes -
            Field Original Value New Value
            Link This issue related JBAS-2587 [ JBAS-2587 ]
            Luc Texier made changes -
            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&lt;/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)
            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&lt;/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...

            Vicky Kak made changes -
            Assignee Weston Price [ weston.price ] Vicky Kak [ vickyk ]
            Jesper Pedersen made changes -
            Assignee Vicky Kak [ vickyk ] Jeff Zhang [ jeff.zhang ]
            Jeff Zhang made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Fix Version/s JBossAS-5.0.0.CR1 [ 12311913 ]
            Fix Version/s JBossAS-4.2.3.GA [ 12311686 ]
            Resolution Done [ 1 ]
            Jason Greene made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                Jeff Zhang
                Reporter:
                Luc Texier
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development