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 107172 - NPE when run query with parameter (mysql table)
Summary: NPE when run query with parameter (mysql table)
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ jimdavidson
URL:
Keywords:
: 106822 (view as bug list)
Depends on:
Blocks: 106402
  Show dependency tree
 
Reported: 2007-06-19 11:52 UTC by Alexey Butenko
Modified: 2008-11-18 13:18 UTC (History)
0 users

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 Alexey Butenko 2007-06-19 11:52:28 UTC
Netbeans IDE Dev 070618

Steps:
- Create VW (J2EE 5) project
- connect to some mysql travle DB
- DnD person table on the designer of Page1
- Open Query Editor by double click on personRowSet under SessionBean1 node in Navigator window
- Add '=?' Criteria to PersonID row
- Run Query

java.lang.NullPointerException
	at com.mysql.jdbc.ResultSetMetaData.getField(ResultSetMetaData.java:381)
	at com.mysql.jdbc.ResultSetMetaData.getColumnType(ResultSetMetaData.java:259)
	at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:80)
	at org.netbeans.modules.db.sql.visualeditor.querybuilder.QueryBuilder.executeQuery(QueryBuilder.java:1223)
	at org.netbeans.modules.db.sql.visualeditor.querybuilder.QueryBuilderGraphFrame.actionPerformed(QueryBuilderGraphFrame.java:1757)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
	at java.awt.Component.processMouseEvent(Component.java:5554)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5319)
	at java.awt.Container.processEvent(Container.java:2010)
	at java.awt.Component.dispatchEventImpl(Component.java:4021)
	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.processMouseEvent(Container.java:3936)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
	at java.awt.Container.dispatchEventImpl(Container.java:2054)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3869)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	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 John Baker 2007-06-20 02:10:07 UTC
Also NPE occurs using Derby
Comment 2 _ jimdavidson 2007-06-22 20:48:29 UTC
This is fixed, probably by the same checkin that fixed 107173.

Note that it's still not possible to run parameterized queries in MySQL, because the MySQL JDBC drivers do not provide
the necessary information.  Instead of an NPE, you should get a dialog explaining the problem.  If you still get an NPE,
please reopen the issue, and report your driver version.

This all works fine in Derby, as it always has.
Comment 3 _ jimdavidson 2007-06-24 06:59:41 UTC
*** Issue 106822 has been marked as a duplicate of this issue. ***
Comment 4 Peter Pis 2007-06-26 08:15:22 UTC
To Reporter: Could you please verify this issue? Thanks.
Comment 5 Petr Blaha 2008-11-18 13:18:33 UTC
Move visualsqleditor subcomponents below visualweb