Porblem loading Microsoft JDBC Driver for SQL Server
843833Jan 15 2007 — edited Jan 17 2007Hi all !!
Well, it seems there is a naming problem for the MS Driver, when Netbeans creates server resources for the Connection Pool and the DataSource, the default name for the connection pool's datasource classname is com.microsoft.jdbc.sqlserver.SQLServerDataSource, but the actual name of the class within the driver's jar is com.microsoft.jdbcx.sqlserver.SQLServerDataSource, note the 'x' after jdbc.
I changed this and the resource is created correctly (from the admin console, it pings to the DB server), but when I try to deploy the project, I get this error:
RAR5038:Unexpected exception while creating resource
RAR5117 : Failed to obtain/create connection. Reason : Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource]
WebModule[WebApplication2]java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
java.lang.RuntimeException: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.microsoft.jdbc.sqlserver.SQLServerDataSource
I guess I must change the name of the classname in some other place, but I searched the admin colsole and Netbeans and failed to find where it should be.
I'm using Netbeans 5.5 and SQL Server 200 with the MS JDBC Driver sp 3.
Thanks in advance,
Daniel