This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 221770 - Server tooling deleting obsolete file problem with Tomcat 5.5
Summary: Server tooling deleting obsolete file problem with Tomcat 5.5
Status: NEW
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Larry Isaacs CLA
QA Contact: Tim deBoer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 18:01 EST by Trung CLA
Modified: 2008-04-03 21:37 EDT (History)
1 user (show)

See Also:


Attachments
Image of the error (81.82 KB, image/png)
2008-03-06 18:01 EST, Trung CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trung CLA 2008-03-06 18:01:54 EST
Created attachment 91818 [details]
Image of the error

Build ID: I-I20080306065043

Steps To Reproduce:
1. Create a dynamic Web Project called 'Area'
2. Import the following wsdl file in WebContent of 'Area' http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceAntTask/srcfiles/AreaService.wsdl
3. Right Click on the imported wsdl file -> Web Service -> Create Web service Client
4. Set the scale to Start. Set the output project to 'AreaClient' (also dynamic web project)
5. Click Finish
6. After the wizard finishes, in the server view, remove 'AreaClient' by right clicking on the server -> "Add and remove..."
7. See an error right after that
8. From now on, whenever a dynamic web project is deploy to the server. We encounter this annoying error in the attachment about deleting obsolete file.
9. This error prevent any subsequent Web Service creation Wizard from succeeding if the scale is set to higher than Start. This makes the problem NOT a minor one

The only way to get away from this is to restart the server.

cc to kathy: Still small chance that this might be a problem caused by our web service codes. When we deploy the client by using the lib files, if we do not release them, they will be stuck.
Comment 1 Tim deBoer CLA 2008-03-07 09:51:57 EST
It isn't clear that this is a server tools problem. Please try manually deleting the published files from the file system to see if they are really locked. My guess would be that either the Tomcat server itself or a workspace process are holding a lock on these files.
Comment 2 Larry Isaacs CLA 2008-04-03 21:37:09 EDT
The bottom line is that this is expected behavior on Windows.  It stems from the Windows "feature" of locking files which have open handles.  It also stems from the fact that the Tomcat plug-in publishes an expanded webapp which Tomcat serves directly.  This allows instant replacement of JSPs, but carries side effects with respect to changing the webapp on a running server, especially on Windows due to locked files.  Unfortunately, there is no simple way to interact with Tomcat to manage individual webapps.  As a result, adding and removing projects from a Tomcat server is guaranteed to work correctly only if the Tomcat server is stopped.  Restarting will typically recover after deleting a project, but it's conceivable that corrupting the live context can interfere with server shutdown.  I've seen this happen on Linux, which doesn't have the file locking problem.

I'll study what might be done to achieve cleaner behavior.  I don't anticipate finding anything for WTP 3.0, but maybe something for later versions, for example not automcatically synchronizing a deleted projects.