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 87475 - Unable to find driver"
Summary: Unable to find driver"
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
: 89533 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-19 05:37 UTC by atellezflores
Modified: 2007-12-18 18:28 UTC (History)
3 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 atellezflores 2006-10-19 05:37:13 UTC
Whe you try to create a Entity Class from DataBase and want to create a
connection using MySQL 5.0 with conector/J 5.0, the IDE connects very well to
the database but the wizard refuses to continue with thi following message
"Unable to find driver", but there's already installed in the libraries secction
of my proyect as well as in the appserver classpath. I'd tried with Derby and it
works perfectly fine that.
Comment 1 atellezflores 2006-10-19 05:40:56 UTC
Well just additional comments, the same project and classpath configurations (in
a matter of fact, is the same appserver with the same configuration) worked well
with RC1 and Betas, but with RC2 refuses to locate the driver, the workaround
was to make a DB Schema and select it to make the Entity Classes from DataBase.
Comment 2 pohl 2007-02-01 22:15:42 UTC
My office is effected by this issue too.  We have to Macs 
running Tiger (and Netbeans 5.5 200610171010) that are effected.

Interestingly, we have one Windows machine running the same
NetBeans and it is able to find the driver in that dialog.
Comment 3 pohl 2007-02-01 22:17:45 UTC
My partner happened to have 5.5rc2 still in his trashcan.

He fired it up (version 200610160000, to be exact) and that
version can successfully find the driver in this dialog.

I'm not sure what's special about the Windows machine running
5.5 200610171010.   That could be a clue to a workaround.

Speaking of workarounds, does anybody have one?
Comment 4 Andrei Badea 2007-02-02 09:09:54 UTC
Do you have the MySQL driver registered under Databases in the Runtime tab? If
yes, which driver class is registered? (You can find that by right-clicking the
driver and choosing Customize).
Comment 5 pohl 2007-02-02 16:48:35 UTC
Yes, the driver is registered.  The path to the jar is

/Library/Java/Extensions/mysql-connector-java-5.0.3-bin.jar

...and the driver class is com.mysql.jdbc.Driver

Netbeans is able to establish a connection to the database, too.
It is only the "entity class from database" dialog that complains.

For comparison, the Windows machine where this dialog works properly
essentially has the same setup:

C:\glassfish\domains\domain1\lib\ext\mysql-connector-java-5.0.3-bin.jar
com.mysql.jdbc.Driver

Comment 6 Andrei Badea 2007-02-15 15:57:30 UTC
I will try to provide a module with some logging, which might help me track down
the cause of the issue.
Comment 7 kalali 2007-02-19 14:34:09 UTC
It looks like to be an stopper in front of users who try to generate cmp from
database. As it is one of Netbeans feature which users usually mention it shoulb
be fixed sooner.

I raise the priority to p2.
Comment 8 thepriz 2007-05-24 22:08:10 UTC
This is also the case in Netbeans IDE 6.0 Preview (M9).
Comment 9 atellezflores 2007-05-26 18:54:56 UTC
I saw that sometimes, besides Netbeans uses com.mysql.jdbc.Driver for the
"Runtime" tab Database connection, the DataSource sometimes uses the old driver
org.gjt.mm.mysql.Driver, which no longer comes with the default driver
jConnector 5, at leas NB seems not to find it. 

It's very funny, 'cause sometimes NB creates the DataSource with the correct
driver and sometimes doesn't, how I figured this out?, well, when you select a
DataSource form the "Create entity classes from database", and you click that
dropdown list, and just put the cursor over the DataSource you wan't, it appears
a popup message telling you the driver it uses, and there's where I found it,

So this is a problem with the generation wizard of NetBeans.
Comment 10 Andrei Badea 2007-05-29 14:12:27 UTC
Nitya, it seems this is yours.
Comment 11 Nitya Doraisamy 2007-05-30 17:09:57 UTC
Looks like the plugin's mapping of the sun resource's datasource-classname to
driver info is the cause of error. Will fix. 
But this mapping will always have some deficiency. The IDE should ask for driver
information if it is unable to resolve this or provide some way for the user to
correct this instead of just popping up an error message.
Comment 12 Nitya Doraisamy 2007-08-03 02:53:43 UTC
Fixed for most cases by fix for IZ103161. Also fixed the original codepath which is now the fallback.
IZ103161 adds a new codepath for most zero-config resource creation and reconstruction of url.
Comment 13 Nitya Doraisamy 2007-08-03 02:59:44 UTC
*** Issue 89533 has been marked as a duplicate of this issue. ***
Comment 14 gholmer 2007-12-18 14:17:59 UTC
I am seeing this problem while trying to create entity classes for an AS/400 (IBM iSeries). I do have the driver
registered, and I can see the table structure from the data source (in the Services tab).  But when I try to create
entity classes, I get "Unable to find the driver. Register this driver in the Databases tab[sic]."  (My Postgres
databases work OK.)  I tried deleting and re-creating the driver reference under the Databases / Drivers node, and
deleting the contents of var/cache in my userdir.

NetBeans 6.0 FCS, IBM JTOpen 6.0 (JDBC driver).

Is there a workaround?  AS/400 data sources work OK with Swing apps and web apps that use JNDI data sources.
Comment 15 Nitya Doraisamy 2007-12-18 17:45:32 UTC
Could you please attach the sun-resources.xml from the setup folder of the project to help identify the issue. 
The plugin does not maintain mappings for the IBM JTOpen 6.0 (JDBC driver), so it might be better to open a seperate
issue with respect to support for this driver. 
The original issue was filed with respect to MySQL

Comment 16 Nitya Doraisamy 2007-12-18 17:52:08 UTC
Opened issue 124212 for IBM JTOpen 6.0 (JDBC driver) support. Please attach the sun-resources.xml from the setup folder
of the project in IZ 124212

 
Comment 17 Nitya Doraisamy 2007-12-18 18:28:36 UTC
Ignore previous comment. IZ 121601 was already opened for support for  IBM AS/400
I have added gholmer to the cc of that issue.

Marking this one as fixed for MySQL