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.
Need stack trace from current build from Anki to reproduce. See http://wiki.netbeans.org/JavaCardTODOs
Here is the NPE stacktrace. java.lang.NullPointerException at org.netbeans.modules.javacard.templates.ServletDeploymentWizardPanel$1.run(ServletDeploymentWizardPanel.java:78) at org.openide.util.Mutex.readAccess(Mutex.java:362) at org.netbeans.modules.javacard.templates.ServletDeploymentWizardPanel.<init>(ServletDeploymentWizardPanel.java:72) at org.netbeans.modules.javacard.templates.ServletWizardIterator.getPanels(ServletWizardIterator.java:109) at org.netbeans.modules.javacard.templates.ServletWizardIterator.current(ServletWizardIterator.java:212) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.current(TemplateWizard.java:980) at org.openide.loaders.TemplateWizardIterImpl.current(TemplateWizardIterImpl.java:140) at org.openide.loaders.TemplateWizardIteratorWrapper.current(TemplateWizardIteratorWrapper.java:89) at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:863) at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:837) at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:731) at org.netbeans.modules.project.ui.NewFileWizard.updateState(NewFileWizard.java:118)
Okay, this is interesting. The thing that is null is the file WEB-INF/web.xml - it doesn't exist in the project. A few ways we can solve this: 1. Don't try to update the web.xml if it doesn't exist (in the code should not assume any file's guaranteed existence) 2. Don't allow this template to be used at all in a non-javacard-web project (but still do the null check, possibly warn the user - they can always configure it later using the Web page of the project properties dialog to update the web.xml) 3. Create and update the web.xml if it doesn't exist Any particular preference?
Anki, any particular preference on how I solve this?
The file WEB-INF/web.xml exists. And the file gets created when creating web project. I guess you tried to create Applet project.
> The file WEB-INF/web.xml exists. So, you are saying, you can reproduce this exception creating a servlet in a project where WEB-INF/web.xml exists? Either way, should fix it so it won't be broken on Applet projects; but if it fails on a web project, then something else is wrong. Let me know steps to reproduce in a web project, if any.
yes we need to fix for Applet projects also. For web projects - to -reproduce 1. Create a new web project. 2. Try adding new Servlet class using the popup menu As you know the menu may be there already in the popup or you have to select other .... and then chose Java Card category(New | Other | Java Card servlet) This will throw NPE. Looks like it is the same reason the NPE is, not able to find web.xml file even for web projects.
Fixed in changeset 45c7eee6a62c
Integrated into 'main-golden', will be available in build *200909010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/45c7eee6a62c User: Tim Boudreau <tboudreau@netbeans.org> Log: #170675 - NPE due to forward reference in servlet template. Also removed one parameterization warning, wildcard imports, and properly log exceptions in WebXMLRefactoring.