Community
Participate
Working Groups
Build Identifier: There are several issues in the implementation of NewManualServerComposite causing the UI not displaying the Server/Module validation message when user selects a project and Run On Server. Reproducible: Always Steps to Reproduce: We were able to reproduce with following use case: Create multiple instances of JavaEE runtime(e.g. WebLogic server 10.3.4). Both runtime has the same runtime type, with with slightly different runtime component. Don't create any server instance. Create a WTP project requiring one of runtime component which is available only in one of the runtime created. Right click the project and RunOnServer, select "Manually Define a New Server": 1. Notice Next is disabled, runtime instance selection combo is hidden and no error message was shown in Wizard. (See screen shot attached) Expected: NewManualServerComposite should display proper error message returned by runtime/module validation for runtime instanced selected -- in this case, the instance lacking the required runtime coponent
Created attachment 182538 [details] UI with problem
Created attachment 182539 [details] Expected UI
Created attachment 182540 [details] Expected UI with multiple RT instances
Created attachment 182542 [details] Proposed patch
Explanation of the fixes: 1. Remove the wizard.setMessage(null) call in checkHostAndServerType will prevent error message from NewServerComposite.isSupportedModule() call being overridden. 2. Added extra server/module validation in setRuntime(IRuntime) to handle user select different runtime instances from Runtime combo 3. Added canSupportModule() method to disable Next button if NewServerComposite.isSupportedModule() returns error status. 4. A bug in updateRuntimeCombo() method: runtimeCombo.select(sel); setRuntime(runtimes[0]); <===========
Danny, can you document (in a bullet form) what regression scenarios you have tested?
Regression scenarios tested: * Launch WTP a new workspace, create several runtime but NOT server instances. * Create basic Web2.5 web project, right click and RunOnServer, the wizard should default to "Manually Define a New Server", as no existing server instance in workspace * select a server type which only support 2.4 facet, e.g. Tomcat5.0, the wizard displays error message as returned from basic project facet/runtime support checking in NewServerComposite.isSupportedModule(IServerAttributes, IModule) - With the same runtime, change selection in the runtime combo and make sure the error checking is triggered - change a different server runtime, make sure the error checking is triggered * Create a project facet which requires a specific runtime component (in case of WebLogic server, it is dynamic module which can be installed on top of baseline server). The checking of the existence of runtime component and project facet is done in the custom WLS ServerDelegate, which will be invoked by Server.canModifyModule(). Create two runtimes, one with the required runtime component, one without. Right click the project and RunOnServer. - make sure the runtime combo is displayed - change selection in the runtime combo and make sure the error checking is triggered - make sure the error message from the WLS ServerDelegate is displayed for the instance lacking the runtime component, Next button disabled. - switch to the WLS runtime with the component, the error message is cleared and Next button enabled.
The changes look safe and the testing didn't seem to bring any problems. Changes committed to 32M
changes released to 32M
changes committed to HEAD
changes released to HEAD
New Gerrit change created: https://git.eclipse.org/r/109015