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 7.3 Beta 2 (Build 201211052012) VM: Java HotSpot(TM) Client VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b11 OS: Linux User Comments: vriha: trying to create HTML project from online template (can provide link offline) Stacktrace: java.lang.AssertionError at org.netbeans.modules.web.clientproject.ui.wizard.ClientSideProjectWizardIterator$NewProjectWizard.instantiate(ClientSideProjectWizardIterator.java:346) at org.netbeans.modules.web.clientproject.ui.wizard.ClientSideProjectWizardIterator.instantiate(ClientSideProjectWizardIterator.java:138) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1044) at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:605) at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:439) at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:253)
Created attachment 127213 [details] stacktrace
probably belongs here
Created attachment 127221 [details] stacktrace trying to reproduce issue 216642
Taking over. The Site Root apparently does not exist. Will investigate and fix.
*** Bug 216642 has been marked as a duplicate of this bug. ***
Fixed, however, when it happens, the error appears in the wizard just for a second and then disappears but this is a bug in the wizards I guess - Davide, can you confirm [1]? So, Láďo, please verify (simply use the "old" ZIP template with incorrect Site Root [/web]) and possibly report a bug against platform/Dialogs&Wizards. Thanks. [1] IOException is thrown from the instantiate() method http://hg.netbeans.org/web-main/rev/ce0e5d477aa4
Looks good to me. Thanks.
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ce0e5d477aa4 User: Tomas Mysik <tmysik@netbeans.org> Log: #221550 - AssertionError at org.netbeans.modules.web.clientproject.ui.wizard.ClientSideProjectWizardIterator$NewProjectWizard.instantiate
Thanks, verified. The wizzard issue is reported as issue #221647. If you press Finish again, IAE is thrown. Will this be "fixed" by fixing the 221647? Or should Finish button be disabled after the first unsuccessful attempt? java.lang.IllegalArgumentException: Already a /home/vriha/Downloads/HTML5Application1/nbproject/project.xml@3fb357:1164f6e at org.netbeans.spi.project.support.ant.ProjectGenerator$1.run(ProjectGenerator.java:127) at org.netbeans.spi.project.support.ant.ProjectGenerator$1.run(ProjectGenerator.java:122) at org.openide.util.Mutex.writeAccess(Mutex.java:438) at org.netbeans.spi.project.support.ant.ProjectGenerator.createProject0(ProjectGenerator.java:122) at org.netbeans.spi.project.support.ant.ProjectGenerator.createProject(ProjectGenerator.java:103) at org.netbeans.modules.web.clientproject.util.ClientSideProjectUtilities.setupProject(ClientSideProjectUtilities.java:109) ... Product Version: NetBeans IDE Dev (Build web-main-9137-on-20121107) Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b11 System: Linux version 3.2.0-32-generic-pae running on i386; UTF-8; en_US (nb)
(In reply to comment #9) > The wizzard issue is reported as issue #221647. Thanks. > If you press Finish again, IAE > is thrown. Will this be "fixed" by fixing the 221647? Yes, it should be. > Or should Finish button > be disabled after the first unsuccessful attempt? This definitely should not do _every_ client of Wizards API (not sure if it is even possible); this should be done in the Wizards component directly. > java.lang.IllegalArgumentException: Already a > /home/vriha/Downloads/HTML5Application1/nbproject/project.xml@3fb357:1164f6e The cause is that the nbproject directory has been created but the Site Root directory was not -> we throw IOException to the Wizards API - this is perfectly OK and should be done so. The result of course should be some error message in the wizard and all buttons disabled I guess (or closing the wizard and some error message displayed to the user? I don't know). Thanks.
(In reply to comment #10) > The cause is that the nbproject directory has been created but the Site Root > directory was not -> we throw IOException to the Wizards API - this is > perfectly OK and should be done so. The result of course should be some error > message in the wizard and all buttons disabled I guess (or closing the wizard > and some error message displayed to the user? I don't know). I think it depends on where an error happened. If the error happens in the instantiate() then we should go back to wizard only in case if we know that calling instantiate() second time can be successful. Otherwise it does not make sense to go back to wizard I think - if all buttons are disabled user cannot do there anything anyway.
(In reply to comment #11) > I think it depends on where an error happened. If the error happens in the > instantiate() then we should go back to wizard only in case if we know that > calling instantiate() second time can be successful. Otherwise it does not make > sense to go back to wizard I think - if all buttons are disabled user cannot do > there anything anyway. Yes, the exception is thrown in instantiate() and we have no possibility to show or hide the wizard - this happens in the Wizards component itself (at least I think so).
Javadoc for InstantiatingIterator.instantiate() says that "if instantiation fails [that is IOException is thrown] then wizard remains open to enable correct values". So in our instantiate we should throw IOException only if it is possible to "correct values [and run instantiate again]". In case when we already created nbproject folder and half the files in instantiate method then we are in situation were we can: * either go back to wizard and let user do there something and on second press of "Finish" button we should override all the files which we have created before; or * not throw IOException at all and finish instantiate() without failure and show a dialog box to user saying "project creation failed because of ...."
In such case: (In reply to comment #13) > * not throw IOException at all and finish instantiate() without failure and > show a dialog box to user saying "project creation failed because of ...." I would prefer this option since the nbproject folder is already created and even if we delete it, the IDE could keep such project in its memory (not tested). So reopening, I will fix it.
Fixed. http://hg.netbeans.org/web-main/rev/92fe0b303a2b
Integrated into 'main-golden', will be available in build *201211150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/92fe0b303a2b User: Tomas Mysik <tmysik@netbeans.org> Log: #221550 - AssertionError at org.netbeans.modules.web.clientproject.ui.wizard.ClientSideProjectWizardIterator$NewProjectWizard.instantiate