This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using jtds, Microsoft JDBC driver or JDBC-ODBC bridge to use MS SQL server with Persistence API, the following error occurs RAR5111 : Error casting to javax.sql.Datasource :{0} RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: com.microsoft.sqlserver.jdbc.SQLServerDriver] Workaround (provided by Andrei Badea): - undeploy the application from the server - in the admin console (http://localhost:4848) make sure the connection pool and the data source you created have been removed (remove them if necessary). - under the Server Resources node in the Project view open the connection pool properties (right-click and Properties). Enter "net.sourceforge.jtds.jdbcx.JtdsDataSource" in the DataSource Classname field. Then open the Properties list (last item) and add the following properties: serverName, portNumber and databaseName (their meaning should be clear). Leave the other three properties there. Expected fix: use appropriate DataSet classes for JDBC drivers
This Sun Resource issue. Move to correct component.
Caused by same issue as 76686. Fix is common for both. Netbeans uses database's driver-classname while appserver uses the datasource-classname. There is a mismatch happening in the mapping. *** This issue has been marked as a duplicate of 76686 ***