Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 282909

Summary: Can't create a new server if rename an existing one
Product: [WebTools] WTP ServerTools Reporter: Angel Vera <arvera>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P3 CC: ccc, StijnDeWitt
Version: 3.0.5   
Target Milestone: 3.0.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 278259    
Bug Blocks:    
Attachments:
Description Flags
v1 none

Description Angel Vera CLA 2009-07-08 14:48:32 EDT
+++ This bug was initially created as a clone of Bug #278259 +++

Build ID: wtp 3.0.3

Steps To Reproduce:
1.Create a server using the default name
2.Rename the server in the server editor
3.Create a new server by launching the new server wizard
The new server is not created.  Instead, the content of the existing one is update with the info from the new server.


More information:
Comment 1 Angel Vera CLA 2009-07-08 14:50:52 EDT
Created attachment 141123 [details]
v1
Comment 2 Carl Anderson CLA 2009-07-30 16:02:06 EDT
Committed to R3_0_5_patches.

Please clone this bug (if necessary) for the 3.1.1 work.
Comment 3 Angel Vera CLA 2009-07-30 16:16:25 EDT
There is a note in the original defect (bug# 278259) that this fix was already committed to 3.1.x. 

Thanks Carl
Comment 4 Stijn de Witt CLA 2010-01-11 07:57:20 EST
There seems to have been a regression. This bug is still/again occurring on Eclipse 3.4.1. I have added the following comment to both https://bugs.eclipse.org/bugs/show_bug.cgi?id=278259 and this bug:

---

Regression? I am on Eclipse 3.4.1 and this issue is (still/again?) occurring.

REPRO:
1. Create a server using the default name
2. Rename the server in the server editor
3. Create a new server by launching the new server wizard

The new server is not created.  Instead, the content of the existing one is
update with the info from the new server.

I think the bug is not actually in the New Server Wizard. It correctly suggests 'Tomcat v5.5 at localhost' (or whatever would be the default for your server) as the name for the new server. That name is now free, because we renamed the first one. So the wizard is correct in suggesting the original name, as it has become available again.

I think the problem is actually in the Servers view that somehow still looks at the old configuration. It thinks the new config is for the old server because it has the same name as the old server had before the rename. If you mess around with it a bit you'll find that the original server can still be restored. Also if you look on disk in the Configuration path for the server, you will find that the configuration folder with the old name has not been removed.

WORKAROUND:
In the New Server Wizard, select a different name as Server name so there will be no collisions with the old name of the existing server.