Bug 128501 - xml errors not nicely handled for sun-resources.xml
xml errors not nicely handled for sun-resources.xml
Status: NEW
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9
6.x
Sun All
: P3 (vote)
: TBD
Assigned To: Vince Kraemer
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-26 21:14 UTC by _ pcw
Modified: 2009-12-10 12:56 UTC (History)
0 users

See Also:
Issue Type: TASK
:


Attachments
Build output for deploy action showing errors. (1.84 KB, text/plain)
2008-02-26 21:14 UTC, _ pcw
Details
message log (37.34 KB, text/plain)
2008-02-26 21:16 UTC, _ pcw
Details

Note You need to log in before you can comment on or make changes to this bug.
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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo