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.
Build: NetBeans IDE Dev (Build 200908171401) VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03 OS: Windows XP, 5.1, x86 Create new Java Application (or Web Application, I was able to reproduce it in both cases). Select File - New File - JUnit - JUnit test Leave default setting and press "Finish" -> Exception is thrown, the test is not created, all buttons of the New File dialog are disabled (except Help button) The only way how to create JUnit test file is to create new Java class and invoke Tools - Create JUnit test Stacktrace: java.lang.AssertionError at org.netbeans.modules.junit.DefaultPlugin.createTestActionCalled(DefaultPlugin.java:1020) at org.netbeans.modules.junit.plugin.JUnitPlugin$1.createTestActionCalled(JUnitPlugin.java:74) at org.netbeans.modules.junit.wizards.EmptyTestCaseWizardIterator.instantiate(EmptyTestCaseWizardIterator.java:294) at org.netbeans.modules.ide.ergonomics.newproject.DescriptionStep$2.instantiate(DescriptionStep.java:301) at org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemanWizardIterator.instantiate(FeatureOnDemanWizardIterator.java:187) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1016) at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:588) at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:409) at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:253) at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:165) at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1524)
This problem is reproducible only with 'Features on Demand' turned on
Build Configuration Note: To catch the bug additionally to the basic cluster the ide.ergonomics module should be also built. I confirm that the bug is reproducible on Product Version: NetBeans IDE Dev (Build 090819) Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb) Userdir: C:\Documents and Settings\vvg\.netbeans\dev
Created attachment 86534 [details] The IDE log after three sequential attempts to create JUnit test.
Note, before each of three assertion errors there is a log record like this: SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.openide.WizardDescriptor$Listener$2$1 And, each assertion error caused by the org.openide.util.RequestProcessor$SlowItem with a message "task failed due to ..." I think, implementation of the junit module is correct and the bug is outside of that module. See the assertion point in the code of the junit module: http://hg.netbeans.org/main/file/1c5ab8f7d046/junit/src/org/netbeans/modules/junit/DefaultPlugin.java#l1020 Probably, the issue 20467 has a relation to this bug. Most likely a root cause of this issue is incorrect manipulation of the threads from viewpoint of AWT in a case when a feature is involved in activating.
*** Issue 170810 has been marked as a duplicate of this issue. ***
Jesse Glick has suggested to delete the assertion, because there aren't any reason to run code of wizards in the event queue dispatch thread. Hence, I've removed (actually commented out) all such assertions in the JUnit module. After this the bug is not reproducible and a JUnit test can be created without any problems. Fixed in the main trunk http://hg.netbeans.org/main/rev/7682a1c75ec4
Build: NetBeans IDE Dev (Build nbms-and-javadoc-3923-on-090911) VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) Platform, Standard Edition for Business, 1.6.0_15-b03 OS: Windows XP, 5.1, x86 User Comments: Stacktrace: java.lang.AssertionError at org.netbeans.modules.junit.DefaultPlugin.createTestActionCalled(DefaultPlugin.java:1020) at org.netbeans.modules.junit.plugin.JUnitPlugin$1.createTestActionCalled(JUnitPlugin.java:74) at org.netbeans.modules.junit.wizards.EmptyTestCaseWizardIterator.instantiate(EmptyTestCaseWizardIterator.java:294) at org.netbeans.modules.ide.ergonomics.newproject.DescriptionStep$2.instantiate(DescriptionStep.java:301) at org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemanWizardIterator.instantiate(FeatureOnDemanWizardIterator.java:187) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1016)
Created attachment 87606 [details] stacktrace