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.

Bug 84406 - Unable to deploy app using MS SQLServer drivers - ClassCastException
Summary: Unable to deploy app using MS SQLServer drivers - ClassCastException
Status: RESOLVED DUPLICATE of bug 84405
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-07 05:52 UTC by _ jimdavidson
Modified: 2006-09-07 06:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ jimdavidson 2006-09-07 05:53:46 UTC
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.
Comment 1 _ jimdavidson 2006-09-07 06:25:56 UTC

*** This issue has been marked as a duplicate of 84405 ***