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 100261

Summary: Regression: JDBC WSDL Wizard Encountered NPE when connect using JDBC-ODBC Bridge data source
Product: soa Reporter: rpoon <rpoon>
Component: Binding ComponentsAssignee: Narayana Pedapudi <narayanap>
Status: RESOLVED FIXED    
Severity: blocker CC: awegscheider
Priority: P2 Keywords: RELNOTE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Unexpected_Exception JPEG
NullPointerException JPEG
Good_Connection_in_IDE_Runtime
Message log
NPE jpeg
BuildInfo

Description rpoon 2007-04-06 22:01:23 UTC
Build:


====================================================

After created a new JDBC-ODBC Bidge - database connection (to SQL Server) under 
NetBeans IDE Runtime, and able to connect successfully (see attached JPEG) in 
JDBC WSDL wizard, using the same connection user is unable to proceed to create 
WSDL with the following NullPointerException once selected a table name:

java.lang.NullPointerException
	at 
org.netbeans.modules.jdbcwizard.wizards.JDBCWizardSelectionPanel.storeSettings
(JDBCWizardSelectionPanel.java:497)
	at org.openide.WizardDescriptor.setValueOpen(WizardDescriptor.java:1161)

-------------------------------------------------------------
To re-create the problem:

1) Create a Data source that connect to SQL Server from windwows 'Data Sources 
(ODBC)'.  Verify successful connection with this data source.

2) In NetBeans IDE/Runtime, create new Database Connection using 'JDBC-ODBC 
Bridge' type driver, and confirm successful connection to external database 
(Connect OK).

3) Now start the JDBC WSDL Wizard, and make connection using the same Database 
Source created in step 2 above. (Connect OK).

4) Now select a table and procceed to the next step.

The NPE occurs after clicking 'Next' on the 'Select DataSource and Table 
Objects' screen.

This is a regression problem.  This problem does not exist with Beta build.
Comment 1 rpoon 2007-04-06 22:02:08 UTC
Created attachment 40581 [details]
Unexpected_Exception JPEG
Comment 2 rpoon 2007-04-06 22:02:57 UTC
Created attachment 40582 [details]
NullPointerException JPEG
Comment 3 rpoon 2007-04-06 22:03:49 UTC
Created attachment 40583 [details]
Good_Connection_in_IDE_Runtime
Comment 4 rpoon 2007-04-06 22:04:19 UTC
Created attachment 40584 [details]
Message log
Comment 5 Narayana Pedapudi 2007-04-11 11:45:43 UTC
For JDBC-ODBC driver we need to select columns by order otherwise driver throws 
Invalid Descriptor Index exception. Because the driver is a native driver. This
is fixed and checked in the source. I wonder how this worked in beta.
Comment 6 rpoon 2007-05-02 18:05:50 UTC
With build:  NetBeans 6.0 Enterprise Pack – Milestone 9
   http://bits.netbeans.org/netbeans/6.0/milestones/m9/200704270000/installers/
     NetBeans IDE 6.0 Preview (M9) Full Installer.exe

=========================================================

Now encountered NullPointerException once selected table (with JDBC-ODBC 
connection) and click Next.

(please see attached jpeg for the NPE message)
Comment 7 rpoon 2007-05-02 18:07:16 UTC
Created attachment 42061 [details]
NPE jpeg
Comment 8 Annette Wegscheider 2007-05-02 21:52:41 UTC
Added to RNs as follows:
Issue #100261: JDBC Database Wizard cannot be used with JDBC-ODBC connections.
Description: If you are connecting to a database using JDBC-ODBC, you cannot use
the JDBC Database Wizard to generate a WSDL file.
Workaround: Use the New WSDL File Wizard to generate a WSDL skeleton. Then
modify the generated WSDL file using the WSDL Editor.

Comment 9 Narayana Pedapudi 2007-05-03 08:46:18 UTC
Created attachment 42080 [details]
BuildInfo
Comment 10 Narayana Pedapudi 2007-05-03 08:51:50 UTC
I have Installed SQL Server on my machine and created the System DSN, could
generate the WSDL with System DSN using JDBC-ODBC drivers. Build used is
"NetBeans IDE 6.0 Preview (M9, build 070430)", If it doesn't work for you, can
you please provide the privileges to connect the SQL Server you are using.
Comment 11 rpoon 2007-05-03 22:12:30 UTC
I have retried and still am able to recreate the problem with latest m9 build:
  http://bits.netbeans.org/download/6.0/milestones/m9/200705021220/installers/

From IDE Runtime, I was able to connect to SQL Server database using the 
JDBC:ODBC connection, however, it failed to proceed to build WSDL from the JDBC 
WSDL wizard (it does not able to continue once connecting to database via JDBC-
ODBC and after a table is selected).
Comment 12 Narayana Pedapudi 2007-05-07 14:03:07 UTC
When working odbc drivers result set must be scrolled sequentially otherwise it
will throw an exception "Invalid Descriptor Exception", this is fixed and
checked in. Please verify with the latest build after this check in.