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.
Created attachment 57306 [details]
Build output for deploy action showing errors.
Created attachment 57308 [details]
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?
no issue should be assigned to issues. redistributing the load