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.
Using JS Creator Shortfin, running on netbeans-5_5-daily-bin-200609040000-ide-4_Sep_2006_0000: Use Drivers -> New Driver to add MS SQLServer Driver (sqljdbc.jar). Driver class is: com.microsoft.sqlserver.jdbc.SQLServerDriver Add new connection using the driver. Note that URL isn't filled in, and must be provided manually. URL looks like: jdbc:sqlserver://hostname:1433;DatabaseName=dbname;selectMethod=cursor Click OK. DB tables are visible in the Explorer. Drag a table onto the form, and drop onto a component (e.g., dropdown or table). Make sure the driver jar has been copied to the AppServer lib directory, and deploy to the AppServer. Error appears in browser: 500. Server log shows the following: RAR5111 : Error casting to javax.sql.Datasource :{0} java.lang.ClassCastException: com.microsoft.sqlserver.jdbc.SQLServerDriver at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:83) at com.sun.enterprise.resource.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:56) at com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1263) at com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:596) at com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:186) at com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:362) at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:289) at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248) at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:174) at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:312) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:222) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:152) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:145) at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:93) at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:365) at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:130) This may be related to Bug #84391, or maybe not. Error message is different, but symptoms are similar. Also note that Bug #84404 describes some design-time problems with MS drivers on Mac OS. This may or may not be related to that.
*** Issue 84407 has been marked as a duplicate of this issue. ***
*** Issue 84406 has been marked as a duplicate of this issue. ***
Not sure if this is caused by the plugin. I don't think it is related to #84391. We will need to get the resource working on the server, using the admin console. Could you attach the app or the resource to the issue to help debug.
I tested again this morning, and could not reproduce the issue. No data were retrieved, apparently due to a problem in the MS driver, but there was no Exception raised. This may or may not be affected by #84391. Why don't I wait until that is fixed, and try again to reproduce it. In the meantime, I'll try to narrow down what went wrong with the driver on this morning's test.
I tried it again today, and was able to reproduce the bug. The problem is that the Connection Pool is misconfigured. The Datasource Classname property is set to: "com.microsoft.sqlserver.jdbc.SQLServerDriver", whereas it should be: "com.microsoft.sqlserver.jdbc.SQLServerDataSource". I don't know whether this happens every time. I have seen it in several different cases. It's a definite bug. Manually editing the property in the Connection Pool (and then redeploying) fixes the problem.
Fixed as part of fix for 84391