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.
When mounting a web module that was not created by NetBeans and has a sun-web.xml, an exception is thrown when created the ConfigDataObject for the sun-web.xml file. This is because the SERVER_STRING file attribute is never set, and thus is null when the code attempts to use it. (ConfigDataObject, line #130) javax.enterprise.deploy.spi.exceptions.ConfigurationException at org.netbeans.modules.j2ee.deployment.config.ConfigDataObject.getStorage(ConfigDataObject.java:133) [catch] at org.netbeans.modules.j2ee.deployment.config.ConfigDataObject.getCookie(ConfigDataObject.java:75) at org.netbeans.modules.j2ee.deployment.impl.projects.J2eeDeploymentLookup.getStorage(J2eeDeploymentLookup.java:171) Wraps this exception: java.lang.NullPointerException at org.netbeans.modules.j2ee.deployment.config.ConfigurationStorage.<init>(ConfigurationStorage.java:51) at org.netbeans.modules.j2ee.deployment.config.ConfigDataObject.getStorage(ConfigDataObject.java:130) To create an example of this with netbeans, create a web module. Unmount the web module. At the OS filesystem level (explorer in Windows, command line or something in UNIX, etc.), delete the files META-INF\.nbattrs and WEB-INF\.nbattrs to delete the file attributes assigned by NetBeans. Now remount the web module and you should get this exception. NetBeans should be able to handle loading web modules it did not create (or were created in prior versions and don't have this attribute or the correct version of it.)
I will fix this ASAP. If somebody in web apps team wants to attempt I will attach what should be the fix (I have not tested it completely but I will double check later)
Created attachment 13382 [details] proposed fix (test before applying)
fixed
*** Issue 40014 has been marked as a duplicate of this issue. ***