[jboss-jira] [JBoss JIRA] Commented: (JBAS-4911) MSSQLValidConnectionChecker throws exception with MS SQL Server 2005 JDBC driver
Luc Texier (JIRA)
jira-events at lists.jboss.org
Thu Oct 25 08:42:01 EDT 2007
[ http://jira.jboss.com/jira/browse/JBAS-4911?page=comments#action_12384313 ]
Luc Texier commented on JBAS-4911:
----------------------------------
FYI, the workaround for now is to use the parameter check-valid-connection-sql instead as follows:
<check-valid-connection-sql>SELECT 1 FROM sysobjects</check-valid-connection-sql>
> MSSQLValidConnectionChecker throws exception with MS SQL Server 2005 JDBC driver
> --------------------------------------------------------------------------------
>
> Key: JBAS-4911
> URL: http://jira.jboss.com/jira/browse/JBAS-4911
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JCA service
> Affects Versions: JBossAS-4.2.2.GA
> Reporter: Luc Texier
> Assigned To: Weston Price
>
> 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 at 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...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list