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 76686 - [55cat] Wrong: datasource created with jdbc driver class
Summary: [55cat] Wrong: datasource created with jdbc driver class
Status: RESOLVED DUPLICATE of bug 103161
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
: 77463 79239 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-22 14:31 UTC by brviking
Modified: 2007-08-06 21:19 UTC (History)
2 users (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 brviking 2006-05-22 14:31:55 UTC
[ BUILD # : 200605170200 ]
[ JDK VERSION : 1.5.0_06 ]

When creating Entity from database tables, I select "DataSource"... "New datasource" (in combobox). The I'm asked to select a connection OR create a new one. In either case, JDBC driver class will be used, and datatasource is created with JDBC driver class insted JDBC datasource class (I'm using Microsoft SQL Server 2K5 JDBC driver, where JDBC driver class is "com.microsoft.sqlserver.jdbc.SQLServerDriver" and JDBC Datasource class is "com.microsoft.sqlserver.jdbc.SQLServerDataSource". Developer should be at least warned that will not be possible to deploy this datasource under GlassFish. GlassFish, instead inform "incorrect glass: must implement DataSource" it says "cannot load com.microsoft.sqlserver.jdbc.SQLServerDriver" as if class isn't in classpath.
Comment 1 Libor Kotouc 2006-05-30 09:08:01 UTC
Nitya, could you please look at it and say whether the AS plugin can either show
some warning as suggested or somehow map the JDBC driver obtained from the
connection to the JDBC data source class?

I saw some mapping at least for the Derby database... and I also saw (but not
filed yet) the error message in the same place as the reporter's complaining
that the driver cannot be found when some data source selected returned a JDBC
data source class instead of a JDBC driver class (of course JDBC data source
class could not be found in the JDBC driver manager).

So, how is this mapping between a JDBC driver class and a JDBC data source class
working?
Comment 2 Nitya Doraisamy 2006-06-27 07:56:52 UTC
Netbeans uses database's driver-classname while appserver uses the
datasource-classname. There is a mismatch happening in the mapping.
Comment 3 Nitya Doraisamy 2006-06-27 07:58:49 UTC
*** Issue 77463 has been marked as a duplicate of this issue. ***
Comment 4 Nitya Doraisamy 2006-06-27 19:58:29 UTC
*** Issue 79239 has been marked as a duplicate of this issue. ***
Comment 5 Nitya Doraisamy 2006-06-27 19:58:55 UTC
Appserver plugin maps driver names to datasource classnames and if it can't find
the corresponding classname, uses the driver name.

The mapping needs to be updated and plugin should inform the user when it cannot
get a classname.
Comment 6 _ ludo 2006-09-07 17:05:31 UTC
it is linked to the recent p2/p1s?
What is the status for this one for 5.5?
Comment 7 Nitya Doraisamy 2007-08-06 21:19:00 UTC
Changes in resource creation logic in 103161 fixes this issue.

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