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.
Summary: | NPE when clicking on file browser button. | ||
---|---|---|---|
Product: | contrib | Reporter: | Jean-francois Denise <jfdenise> |
Component: | JMX | Assignee: | Jean-francois Denise <jfdenise> |
Status: | NEW --- | ||
Severity: | blocker | CC: | anebuzelsky, mslama, slions |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 202410 | ||
Bug Blocks: |
Description
Jean-francois Denise
2009-03-30 15:38:27 UTC
Marku, take this one. Please give exact steps how to reproduce. I do not know what do you mean by 'JMX module' ie. how to invoke that File browser you talk about. Why is it P2? In addition NPE happens in nodes so passing there for evaluation. The JMX module is a stable Module. It is not part of the bundled modules. Once of the wizards offered by this module allow to generate a properties file. In the first step of this wizard (in New File/JMX/New Management Configuration File), a Browse button allows to select a file. Clicking on this button makes the NPE to occur. Thanks. JF It seems that null key was supplied to nodes via setKeys(). Nothing to fix in nodes, max. I can check keys and throw NPE earlier. Yes Tomas is right. It would be good if null key is invalid value if setKey would throw some Invalid exception directly so that it is clear. In this case SourceGroup array contains one null element. But I do not know this code and have no idea who should provide valid value for SimpleTargetChooserPanelGUI. Passing to Milan to help with this. SimpleTargetChooserPanelGUI.constructor is called with empty folders array ie. its length is 0. Either it is not valid and it should inform about it or SimpleTargetChooserPanelGUI should handle this better. Steps to reproduce: 1.First modules jmx, jmx.common, jconsole must be compiled because they are not in build. 2.Then JMX item will appear in New File wizard at first place. Select 'Management Configuration File' on right side and select Next. 3.Now at second wizard panel initialization is incorrect and pressing Browse button will cause NPE described above. I will file separate issue for nodes about better diagnostic. We have validated the JMX and JConsole modules for NB67. This issue is the last remaining blocker on our side. Could you provide a status ? We noticed that the bug status changed. Is there any progress? Is there any fix to be done on our side? Thanks. JF Reassigning to Jesse. The faulty code is JMXConfigWizardIterator. I am adding better diagnostic exceptions in core-main #72b0d69d1271 so it will now print: java.lang.IllegalArgumentException: Attempting to create panel with an empty folders list at org.netbeans.modules.project.ui.SimpleTargetChooserPanel.<init>(SimpleTargetChooserPanel.java:76) at org.netbeans.modules.project.ui.ProjectChooserFactoryImpl.createSimpleTargetChooser(ProjectChooserFactoryImpl.java:65) at org.netbeans.spi.project.ui.templates.support.Templates.createSimpleTargetChooser(Templates.java:226) at org.netbeans.modules.jmx.configwizard.JMXConfigWizardIterator.getTargetPanel(JMXConfigWizardIterator.java:208) at org.netbeans.modules.jmx.configwizard.JMXConfigWizardIterator.initialize(JMXConfigWizardIterator.java:282) ... In my experiments, the first time you select this template it passes new SourceGroup[0]; Back and Next will cause it to pass null (which is legal); selecting some other template in the same category, Back, then Next on this template will cause it to pass new SourceGroup[] {src, test}. Probably the code ProjectUtils.getSources(project).getSourceGroups("properties") is responsible, whatever that is supposed to accomplish. (I have never heard of source groups using a type by that name; I would expect it to always return new SourceGroup[0].) Integrated into 'main-golden', will be available in build *200904100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/72b0d69d1271 User: Jesse Glick <jglick@netbeans.org> Log: #161478 diagnostics: NPE traced back to bug in client. |