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 50551 - Runtime - Databases - Add Driver - NullPointerException
Summary: Runtime - Databases - Add Driver - NullPointerException
Status: CLOSED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-18 11:52 UTC by m00n
Modified: 2006-03-24 10:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Resulting messages.log with stack trace (12.52 KB, text/plain)
2004-10-18 11:54 UTC, m00n
Details
The xsl stylesheet causing the error (42.35 KB, text/xml)
2004-10-18 12:15 UTC, m00n
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m00n 2004-10-18 11:52:16 UTC
Version: NetBeans IDE Dev (Build 200409220845)
JDK (1.5.0) Java HotSpot(TM) Client VM 1.5.0-b64;

NullPointerException in GUI. To reproduce:
1. Go to "Runtime" tab in IDE
2. Expand "Databases"
3. Right-click on "Drivers" and select "Add 
Driver..."
4. Tried to add jt400.jar (IBM jtOpen 4.5) for 
OS400
5. It doesn't find the driver class and name
6. clicking on find (to find the driver(s) in the 
jar) produces a NullPointerException
Comment 1 m00n 2004-10-18 11:54:52 UTC
Created attachment 18353 [details]
Resulting messages.log with stack trace
Comment 2 m00n 2004-10-18 12:10:47 UTC
Attempt to reproduce the same exception with MSSQL and MySQL drivers 
didn't succeed. My guess is the exception is due to the IBM OS400 DB2 
driver. Even if the problem is due to the driver, it shouldn't 
produce a NullPointerException.

At the end of the message.log you can see that some value is being 
labeled as "undefined":
"ERROR:  'jar:file:/E:/jlib_as400/jt400.jar!/com/ibm/as400/util/gencmd
doc.xsl: line 126: Variable or parameter '_WHERE_ALLOWED_TO_RUN' is 
undefined.' FATAL ERROR:  'Could not compile stylesheet'"

Will extract and attach the stylesheet.
jtopen 4.5 can be downloaded from IBM:
http://www-1.ibm.com/servers/eserver/iseries/toolbox/index.html
Comment 3 m00n 2004-10-18 12:15:17 UTC
Created attachment 18354 [details]
The xsl stylesheet causing the error
Comment 4 m00n 2004-10-18 12:35:57 UTC
A few things i forgot to mention (first time here :-)
After getting the NullPointerException the "Driver Class" combo box 
contains the correct class name, but it is not selected automatically.
Probably due to the unexpected exception...
The name of the driver is not found at all.
Select the class (com.ibm.as400.access.AS400JDBCDriver) and enter 
some descriptive name (f.e. as400), click on OK.
Now when trying to connect to some system, you'll also note that the 
jdbc url is not filled in...
Should be "jdbc:as400://<host>:<port>"
Comment 5 Radko Najman 2004-10-27 12:57:52 UTC
NPE seems like a duplicate of issue #38380.
Comment 6 Pavel Flaska 2005-02-25 10:51:10 UTC
Calls on progress bar are now done in EventDispatchThread.

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.25; previous revision: 1.24
done
Comment 7 Martin Schovanek 2005-11-21 09:57:27 UTC
VERIFIED