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.

Bug 39937 - Cannot mount existing webmodule w/ existing server configuration
Summary: Cannot mount existing webmodule w/ existing server configuration
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
: 40014 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-11 01:33 UTC by _ pcw
Modified: 2004-02-13 23:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed fix (test before applying) (950 bytes, patch)
2004-02-12 00:03 UTC, Pavel Buzek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2004-02-11 01:33:01 UTC
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.)
Comment 1 Pavel Buzek 2004-02-12 00:02:39 UTC
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)
Comment 2 Pavel Buzek 2004-02-12 00:03:29 UTC
Created attachment 13382 [details]
proposed fix (test before applying)
Comment 3 Pavel Buzek 2004-02-13 23:23:49 UTC
fixed
Comment 4 Pavel Buzek 2004-02-13 23:35:49 UTC
*** Issue 40014 has been marked as a duplicate of this issue. ***