users@glassfish.java.net

RE: Sun Application Server 9 and SQL Server?

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Fri, 27 Apr 2007 18:01:16 +1000

> -----Original Message-----
> From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
> Sent: Friday, 27 April 2007 5:50 PM
> To: users_at_glassfish.dev.java.net
> Subject: Re: Sun Application Server 9 and SQL Server?
>
> jdbc driver is in domains/<domain_name>/lib/ext
> I changed resource type to javax.sql.ConnectionPoolDataSource
> I get the same error message.
[snip]
> attr: Value=jdbc:odbc:axa
> The log message is null.

> Configured ConnectionPool
> Class name: com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolData
> ResourceType: javax.sql.DataSource
> Set additional properties
> URL: jdbc:odbc:<name of odbc datasource>

I'd definitely be using the jTDS driver over the Microsoft supplied one
in terms of quality/performance/stability, but, if you're using
com.microsoft.sqlserver.jdbc.Foo then its not registered to recognize
URL's of the form jdbc:odbc:... that's the JDBC/ODBC bridge driver
(which again I don't think you want to be using, or at least not in
production).

The MS one looks for URL's of the form:

  jdbc:microsoft:sqlserver://localhost:1433

I'd say that's where the NPE ultimately comes from, although it could
use a nicer catch and log message.

Cheers
Joe

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.