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 119514 - ILE when IDE tryies to find Driver class for Bundled Postgres and MySql drivers
Summary: ILE when IDE tryies to find Driver class for Bundled Postgres and MySql drivers
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 19:57 UTC by Yousuf Haider
Modified: 2007-10-31 19:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ide log (39.96 KB, text/plain)
2007-10-19 19:57 UTC, Yousuf Haider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Haider 2007-10-19 19:57:16 UTC
Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710190908)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

Steps to reproduce:
1. Expand Databases/Drivers node under Services tab.
2. Right click on bundled Postgres/Mysql driver and click on Customize.
3. Click on 'Find' for driver class.

Exception will be thrown:
java.lang.IllegalArgumentException: URI is not hierarchical
        at java.io.File.<init>(File.java:363)
        at org.netbeans.modules.db.explorer.dlg.AddDriverDialog$1.run(AddDriverDialog.java:370)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)

(attaching full IDE log)


Similar exceptions were reported during automatic JDBC driver deployment on servers for MySql drivers here:

Issue 119278
Issue 119423


Seems like this is a general issue with the paths of these bundled drivers and might require fixes in other areas as well.
Comment 1 Yousuf Haider 2007-10-19 19:57:40 UTC
Created attachment 51331 [details]
Ide log
Comment 2 David Vancouvering 2007-10-22 20:32:34 UTC
Is there a workaround?  If not, doesn't this sound like a P2?
Comment 3 Yousuf Haider 2007-10-22 20:51:45 UTC
Well there is no workaround for finding the Driver ClassName. I'll upgrade it to a P2. 

The underlying issue of why this is might be happening has been explained by  phejl on issue 119423:

"This bug occurs due to incorrect behaviour of the org.netbeans.api.db.explorer.JDBCDriver.getURLs(). According to
javadoc it should return urls of the jdbc driver files, however for bundled drivers it returns url pointing inside a file."

Comment 4 Andrei Badea 2007-10-23 11:00:11 UTC
This isn't a P2. It's unlikely users will want to invoke Find Driver on the bundled drivers, which are registered and
work just fine. Find Driver is mostly used when registering a new driver, and one that the DB Explorer doesn't know.
Comment 5 Andrei Badea 2007-10-30 17:48:57 UTC
Fixed.

Checking in src/org/netbeans/modules/db/explorer/dlg/AddDriverDialog.java;
/cvs/db/src/org/netbeans/modules/db/explorer/dlg/AddDriverDialog.java,v  <--  AddDriverDialog.java
new revision: 1.48; previous revision: 1.47
done
Comment 6 Yousuf Haider 2007-10-31 19:43:35 UTC
Verified on:

Product Version: NetBeans IDE Dev (Build 200710310000)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)