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.
dev build 200304160100 Sun JDK 1.4.1 If I invoke the Import Management Tool and hit FINISHED before it finishes initializing (it reads "please wait" on the main panel) I get the following exception: java.lang.IllegalStateException: Cannot initialize -1th child of node null; it already belongs to node org.netbeans.modules.java.imptool.ImpDataSourceNode@13a98d3[Name=Class, displayName=Class Name] at org.openide.nodes.Node.assignTo(Node.java:247) at org.openide.nodes.Children$Array.refreshImpl(Children.java:1232) at org.openide.nodes.Children$2.run(Children.java:1244) at org.openide.util.Mutex.postRequest(Mutex.java:875) at org.openide.util.Mutex.postWriteRequest(Mutex.java:375) at org.openide.nodes.Children$Array.refresh(Children.java:1242) at org.openide.nodes.Children$Array.add(Children.java:1284) at org.netbeans.modules.java.imptool.ImpDataSource.createRootFQNNode(ImpDataSource.java:278) at org.netbeans.modules.java.imptool.ImpToolExecutor.finished(ImpToolExecutor.java:135) [catch] at org.openide.util.AsyncInitSupport.run(AsyncInitSupport.java:107) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
This (or similar) bug appears randomly on S1S5. Here is exception I've got after numerous attempts to reproduce it: S1S5 jdk1.4.1_02 Annotation: Exception occurred in Request Processor java.lang.NullPointerException at org.netbeans.modules.java.imptool.ImpDataSource.createRootFQNNode(ImpDataSource.java:278) at org.netbeans.modules.java.imptool.ImpDataSource.runSilentFromNextStage(ImpDataSource.java:552) at org.netbeans.modules.java.imptool.ImpToolExecutor.execute(ImpToolExecutor.java:85) at org.netbeans.modules.java.imptool.ImpToolAction.performAction(ImpToolAction.java:41) at org.openide.util.actions.NodeAction.performAction(NodeAction.java:184) at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:175) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)
Gili could you please add a testcase for this bug?
The problem is a variant of reader/writer mistiming. If Initializazion of data source called during asynchronious GUI job hasn't finished at the moment when user press "Finish" button then one of the earlier reported exception may appear. To fix this problem I propose to disable "Finish" and "Next" buttons during asynchronious initilalization of data source. Once data has initialized buttons are enabled again. This fix is doesn't lock "Cancel" button so user still have an option to interrupt the process.
Created attachment 11607 [details] Proposed patch to fix this bug.
Created attachment 11645 [details] Corrected patch for this bug.
*** Issue 36508 has been marked as a duplicate of this issue. ***
Evgeni, is this issue solved?
Closing as WONTFIX. Import Management Tool was replaced by Fix Imports action