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 128501

Summary: xml errors not nicely handled for sun-resources.xml
Product: serverplugins Reporter: _ pcw <pcw>
Component: Sun Appserver 9Assignee: Vince Kraemer <vkraemer>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Sun   
OS: All   
Issue Type: TASK Exception Reporter:
Attachments: Build output for deploy action showing errors.
message log

Description _ pcw 2008-02-26 21:14:03 UTC
Create a web app using V2 as JavaEE server.
Add a JDBC or other resource to it.
Open sun-resources.xml and add a blank line preceding the first line (the one containing <?xml ...>) and save.

Note this is causes this to be invalid xml, as you can discover by Right Click | Validate XML.  Note also the error
glyph on the project node for this file.

Now deploy the project -- an exception will be logged in the log file and multiple errors will be in the build script
(see attached).  These could be handled much better.

Restart the IDE and open the resources node.  More errors will be logged.  Both messages.log attached.
Comment 1 _ pcw 2008-02-26 21:14:55 UTC
Created attachment 57306 [details]
Build output for deploy action showing errors.
Comment 2 _ pcw 2008-02-26 21:16:53 UTC
Created attachment 57308 [details]
message log
Comment 3 _ pcw 2008-02-26 21:21:14 UTC
There are three exceptions in the message log.  Ignore the one caught and logged by getDDRoot0() (the first one).  It
should be handled separately and isn't a problem.

The second two, caught and logged in getResourcesGraph() are the ones that need work - this code path does not seem to
have good error handling.  There does not appear to be a clear way to return a stable graph (or null) along with an
error about what is wrong with the true graph so that the caller can present this nicely to the user (regardless of
whether the caller is the sun-resources node in the project or the deploy code.)

Also to consider is what deploy should do when sun-resources.xml cannot be read -- currently it prints errors in the
build output but deploys and shows the build as successful.  Can we do better?
Comment 4 Vince Kraemer 2009-12-10 12:56:46 UTC
no issue should be assigned to issues. redistributing the load