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 67288

Summary: Notification problems when sun-web.xml is invalidate
Product: serverplugins Reporter: Petr Blaha <blaha>
Component: Sun Appserver 8Assignee: _ pcw <pcw>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 95131    
Bug Blocks:    

Description Petr Blaha 2005-10-21 11:55:49 UTC
[build 20051019]
Steps:
1) create new web project
2) open sun-web.xml in text mode
3) make the sun-web.xml invalide, e.g. delete last </sun-web-app> element
4) save file
5) open web.xml file in text mode
6) make web.xml invalide
7) save web.xml file
ERROR: Data lost in sun-web.xml
Comment 1 _ pcw 2005-10-26 18:36:19 UTC
The problem here is a couple of things.  When sun-web.xml is changed and saved,
code automatically reads sun-web.xml and reloads the parallel DConfigBean tree
with the new data.  Since the sun-web.xml is invalid, the tree is flushed.  This
is probably bad -- I have to think about what really should happen here.

Then when web.xml is changed, sun-web.xml is automatically saved (this actually
is an inefficiency in the current system that will be fixed as part of Bug
#67527, but it could be reproduced anyway by making a change to web.xml that
required changes to sun-web.xml such as adding a web service, client, or resource).

The sun-web.xml saved in this case is from the DConfigBeans, which were flushed
and that is why there is the data loss.  The proper fix is to decide what to do
about handling invalid XML saved from the editor and there are a couple of
decisions to make there.
Comment 2 _ pcw 2005-11-08 08:52:23 UTC
I checked in patch that resolves the dataloss aspect of this bug.  Now, when
refreshing DConfigBean tree after a save of from the text XML editor (or any
reload from disk request actually), if the xml descriptor cannot be parsed or
read, etc., the prior bean configuration for that file will be used to reset the
tree (which should correspond to the values it already had, btw).

We still need to notify the user explictly that we failed to restore the tree
properly because of whatever the error was and there is still the issue of
decorating the sun-xxx.xml node with an error glyph (bug #67290).

Downgrading to P3 since dataloss aspect is fixed.
Comment 3 _ pcw 2005-12-13 05:56:42 UTC
Title changed to reflect latest bug status.
Comment 4 Vince Kraemer 2007-02-10 02:17:12 UTC
link related issues
Comment 5 Vince Kraemer 2007-05-15 17:52:20 UTC
tm change
Comment 6 _ pcw 2007-07-20 21:18:02 UTC
Fixed by virtue of new editor design.