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.
In a current build, I create a Web Project w/ Visual JSF, then drag a database table onto the form. RowSet is created in Session Bean, as expected. Right click on Session Bean in outline, then "Edit SQL Statement". NPE arises. Looking through the log, there are messages: javax.naming.NamingException: java:comp is not an instance of Context; remaining name 'env' at org.netbeans.modules.visualweb.dataconnectivity.naming.DesignTimeContext.createSubcontext(DesignTimeContext.java:427) at org.netbeans.modules.visualweb.dataconnectivity.naming.DesignTimeContext.createSubcontext(DesignTimeContext.java:440) ............... SEVERE: java:comp/env/jdbc javax.naming.NameNotFoundException: java:comp/env/jdbc at org.netbeans.modules.visualweb.dataconnectivity.naming.DesignTimeContext.listBindings(DesignTimeContext.java:373) at org.netbeans.modules.visualweb.dataconnectivity.naming.DesignTimeContext.listBindings(DesignTimeContext.java:381)
*** Issue 98665 has been marked as a duplicate of this issue. ***
M8 build test by QE Stack trace doesn't point to data sources 1) DnD static text 2) DnD Person table onto the static text 3) Double click on the person rowset in the Outline java.lang.NullPointerException at org.netbeans.modules.visualweb.dataconnectivity.customizers.VisualSQLEditorMetaDataImpl.<init>(VisualSQLEditorMetaDataImpl.java:103) at org.netbeans.modules.visualweb.dataconnectivity.customizers.VisualSQLEditorMetaDataImpl.getDataSourceCache(VisualSQLEditorMetaDataImpl.java:70) at org.netbeans.modules.visualweb.dataconnectivity.customizers.SqlCommandCustomizer.getCustomizerPanel(SqlCommandCustomizer.java:101) at org.netbeans.modules.visualweb.insync.live.DesignBeanNode.invokeCustomizer(DesignBeanNode.java:1178) at org.netbeans.modules.visualweb.insync.live.CustomizeAction.performAction(CustomizeAction.java:85) at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:559) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:55) at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:555) at org.netbeans.modules.visualweb.insync.live.CustomizeAction$DelegateAction.actionPerformed(CustomizeAction.java:118) at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:1396) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252) at java.awt.Component.processMouseEvent(Component.java:6041) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3995) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
I sent John an email. The NPE arises from a pair of lines: dataSourceInfo = DataSourceInfoManager.getInstance().getDataSourceInfoByName(dsName) ; dataSourceInfo.addConnectionListener(listener) ; The first call returns null, which is why the second calls yields an NPE. The first call should not return null.
#98564 Fix dataconnectivity will no longer use DataSourceInfoManager. This class will be removed soon. Fix is to use ProjectDataSourceManager and RequestedJdbcResource classes instead
verified in m8 nb/vwp 0328