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 68140 - Trying to switch a web project from SJSAS to tomcat caused an NPE if sun-web.xml does not exist.
Summary: Trying to switch a web project from SJSAS to tomcat caused an NPE if sun-web....
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-05 01:09 UTC by _ pcw
Modified: 2006-06-04 23:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2005-11-05 01:09:39 UTC
Create a web project w/ SJSAS as target server.
Delete sun-web.xml
Go to project node and select Properties off the popup menu.

NullPointerException in get/setContextRoot in SunONEDeploymentConfiguration
because the storage object that manages the DConfigBeans is unavailable (it's
owned by the DataObject which was destroyed when sun-web.xml deleted.)
Comment 1 _ pcw 2005-11-05 01:14:16 UTC
We now handle null storage object in this case.  This means our
ConfigurationSupport implementation will return null for context root on
getContextRoot() call and do nothing on setContextRoot() call.

Still considering what to do about recreating the configuration when it is
deleted like this.  Probably will create default configuration on
setContextRoot() if storage is null, but this doesn't handle the case for
sun-ejb-jar.xml.  I will file another issue to deal with this aspect (how to
recreate sun-xxx files when deleted by the user).  For now, closing and
reopening the project would recreate the file.

Fixed.