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 111161 - Oracle: NPE is caused by DnD DB table on any managed Bean (ApplicationBean1, ...)
Summary: Oracle: NPE is caused by DnD DB table on any managed Bean (ApplicationBean1, ...
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P2 blocker (vote)
Assignee: John Baker
URL:
Keywords: REGRESSION
: 111943 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-26 18:41 UTC by _ alexpetrov
Modified: 2007-08-21 19:29 UTC (History)
4 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 _ alexpetrov 2007-07-26 18:41:49 UTC
Mac OS X, build #0707241200, j2sdk 1.5.0_06

1. Connect to DB Oracle (ojdbc14.jar, jdbc:oracle:thin:@jbrave-pc1.sfbay.sun.com:1521:ora10g, travel/travel)
2. Create new VWP project for Tomcat (J2EE 1.5 or 1.4)
3. DnD any DB Travel table on ApplicationBean1 in the window Navigator

Result:
NullPointerException will appear.

SEVERE [global]
java.lang.NullPointerException
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DesignTimeDataSource.getConnection(DesignTimeDataSource.java:229)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DesignTimeDataSource.getConnection(DesignTimeDataSource.java:211)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DatabaseMetaDataHelper.getConnection(DatabaseMetaDataHelper.java:439)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DatabaseMetaDataHelper.getMetaData(DatabaseMetaDataHelper.java:446)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DatabaseMetaDataHelper.getTablesInternal(DatabaseMetaDataHelper.java:361)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DatabaseMetaDataHelper.getTableMetaData(DatabaseMetaDataHelper.java:90)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DatabaseMetaDataHelper.getTableOrViewMetaData(DatabaseMetaDataHelper.java:133)
	at org.netbeans.modules.visualweb.dataconnectivity.sql.DatabaseMetaDataHelper.getNoSchemaName(DatabaseMetaDataHelper.java:194)
	at org.netbeans.modules.visualweb.dataconnectivity.explorer.RowSetBeanCreateInfoSet.setDataSourceInfo(RowSetBeanCreateInfoSet.java:93)
	at org.netbeans.modules.visualweb.dataconnectivity.model.DatasourceTransferManager$DatasourceBeanCreateInfoSet.beansCreatedSetup
(DatasourceTransferManager.java:181)
	at org.netbeans.modules.visualweb.insync.live.DesignBeanNode$BeanCreateInfoSetPasteType.paste(DesignBeanNode.java:815)
	at org.openide.explorer.view.DragDropUtilities.performPaste(DragDropUtilities.java:175)
	at org.openide.explorer.view.TreeViewDropSupport.drop(TreeViewDropSupport.java:747)
	at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
	at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
	at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
	at java.awt.Component.dispatchEventImpl(Component.java:3892)
	at java.awt.Container.dispatchEventImpl(Container.java:2068)
	at java.awt.Component.dispatchEvent(Component.java:3869)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
	at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4007)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3861)
	at java.awt.Container.dispatchEventImpl(Container.java:2054)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3869)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 _ alexpetrov 2007-07-26 18:58:45 UTC
REGRESSION???

NPE is caused by DnD Oracle DB table on any managed bean (ApplicationBean1, ...).
DnD Oracle DB table on Designer has no effect - nothing happens.

The same problem on WinXP:
Product Version: NetBeans IDE Dev (Build 200707241200) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb) 
Comment 2 _ alexpetrov 2007-07-26 19:10:18 UTC
More exactly:
DnD Oracle DB table on Designer - new tree subnode cachedRowSetDataProvider will appear under Page1 tree node.
It looks like data provider, but row set wasn't created.
Comment 3 Jayashri Visvanathan 2007-07-26 21:53:51 UTC
Winston is on vacation, assigning to Jim for evaluation
Comment 4 _ jimdavidson 2007-07-27 06:55:27 UTC
I will investigate.  In the meantime, please upgrade your Mac installation to the latest version of Java (1.5.0_07). 
That doesn't appear to be a problem here (since the bug also happens in XP), but it could cause other issues. 
Comment 5 Yousuf Haider 2007-07-27 17:41:36 UTC
I can reproduce this issue as well on build : 200707270000

But there is a workaround. When adding the jdbc driver if the driver class name is changed to
oracle.jdbc.driver.OracleDriver rather than the default which is oracle.jdbc.OracleDriver this will not happen. 

Comment 6 Jayashri Visvanathan 2007-07-27 18:41:30 UTC
Thanks a lot Yousuf for the evaluation. Since there is work around, lowering priority.
Comment 7 _ jimdavidson 2007-07-30 06:32:38 UTC
This seems to have been caused by the fix for IZ# 110472 ("Migrated Oracle database connection from Creator not
appearing in IDE").  We need to find a fix for that issue that doesn't cause this one.

BTW, the Oracle javadocs say, "Beginning in Oracle9i, the Oracle extensions to JDBC are captured in the package
oracle.jdbc.   ....   Your code should use the package oracle.jdbc instead of the package oracle.jdbc.driver used in
earlier versions of Oracle."

So, we should use oracle.jdbc.OracleDriver as the driver class, and look for a different approach to the migration issue.
Comment 8 _ alexpetrov 2007-08-06 11:26:58 UTC
*** Issue 111943 has been marked as a duplicate of this issue. ***
Comment 9 John Baker 2007-08-06 19:29:30 UTC
Fixed by reverting fix for 110472.  DriverListUtil uses the wrong driver class name

Checking in
visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/datasource/DataSourceResolver.java;
/cvs/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/datasource/DataSourceResolver.java,v
 <--  DataSourceResolver.java

new revision: 1.10; previous revision: 1.9
done
Comment 10 _ alexpetrov 2007-08-07 12:12:21 UTC
Product Version: NetBeans IDE Dev (Build 200708070000) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 
System: Windows XP version 5.1 running on x86

Verified.
Comment 11 _ alexpetrov 2007-08-20 17:53:24 UTC
Keyword "REGRESSION" was added.
Comment 12 John Baker 2007-08-21 19:29:44 UTC
Agreed, this was a Regression