Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341291 - Bad ServerEditorSection destroys server editor's first page
Summary: Bad ServerEditorSection destroys server editor's first page
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2.5   Edit
Assignee: Elson Yuen CLA
QA Contact: Elson Yuen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 18:21 EDT by Rob Stryker CLA
Modified: 2017-10-11 16:37 EDT (History)
1 user (show)

See Also:


Attachments
Adds a try/catch around the creation of the section; logs error (1.70 KB, patch)
2011-08-02 05:26 EDT, Rob Stryker CLA
eyuen7: iplog+
Details | Diff
v1.0 (1.40 KB, patch)
2011-08-11 15:16 EDT, Elson Yuen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2011-03-29 18:21:11 EDT
In the event some plugin adds a ServerEditorSection to many or all servers' editors, and that ServerEditorSection makes incorrect assumptions (all servers have runtimes, all servers have launch configs, etc), and causes a runtime exception of some sort, the entire first page of the editor refuses to show up.

This is very confusing to the user. It also blows away the stack. 

Is there some other solution we can provide here? Perhaps a try/catch in ServerEditorPart.insertSections(etc) ?

Link:  https://issues.jboss.org/browse/JBIDE-8643
Comment 1 Angel Vera CLA 2011-03-30 15:04:25 EDT
Rob, I don't understand the description on this bug. Sure we can add a try/catch, but can you please explain more clearly the problem?

1) What is the scenario, some adopter doing something wrong? 

2) You say the first page doesn't show, is there something that shows instead? Does it show grey with an exception inside?

3) With a try/catch block what behaviour do you expect? For the first page to show but that section not to show, I assume?
Comment 2 Rob Stryker CLA 2011-03-30 15:44:55 EDT
1) What is the scenario, some adopter doing something wrong? 

Some adopter, specifically JRebel, has added a section for all servers. If you have JRebel installed, then you will see this bug. Their section's createSection(etc) method throws a runtime exception, and this propagates up the stack. 

2) You say the first page doesn't show, is there something that shows instead?
Does it show grey with an exception inside?

In our specific example, the server we tested it with had two pages, the default "Overview" page which every server should have, and an additional page. When we experienced this bug, all we saw was our second page. There was no first page at all, nor a blank page with an error on it. The only indication something went wrong was a stack-trace in the Error log view. 

3) With a try/catch block what behaviour do you expect? For the first page to
show but that section not to show, I assume?

I would expect that the first page (since it contains critical information) does show, and that the offending section did not show, or that it showed in whatever state it was in when the runtime exception was thrown.
Comment 3 Rob Stryker CLA 2011-08-02 05:26:44 EDT
Created attachment 200693 [details]
Adds a try/catch around the creation of the section; logs error
Comment 4 Elson Yuen CLA 2011-08-11 15:16:38 EDT
Created attachment 201342 [details]
v1.0

Rob, thanks for submitting the patch.  The logic in the patch looks good.  Updating the patch based on the original one to clean up the trace code.
Comment 5 Rob Stryker CLA 2011-08-12 03:06:40 EDT
Hey Elson:  Great addition!

Will this also make it into 3.3.1?
Comment 6 Elson Yuen CLA 2011-08-12 10:04:57 EDT
Yes, all changes on 3.2.5 will be ported to 3.3.1 and 3.4.
Comment 7 Elson Yuen CLA 2011-08-15 15:22:25 EDT
Code released to 32M, 33M and HEAD
Comment 8 Eclipse Genie CLA 2017-10-11 16:37:06 EDT
New Gerrit change created: https://git.eclipse.org/r/109064