Bug 135035 - Server fails to publish JSF page
Summary: Server fails to publish JSF page
Status: CLOSED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: 1.0.2   Edit
Hardware: PC Windows XP
: P2 critical (vote)
Target Milestone: 1.0.3 M103   Edit
Assignee: Tim deBoer CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2006-04-05 10:47 EDT by Allan Zhang CLA
Modified: 2017-10-11 16:01 EDT (History)
2 users (show)

See Also:


Attachments
Patch to check timestamps during smart publish (3.46 KB, patch)
2006-05-11 12:55 EDT, Tim deBoer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Zhang CLA 2006-04-05 10:47:20 EDT
It appears PublishUtil.smartCopy always publish when there is no change, for example webserviceutils.jar in the \lib folder where should not publish. In this case, the jar is being used by the application.

!MESSAGE Error copying file to D:\0613.12\ws1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wpClientEAR.ear\wpClient.war\WEB-INF\lib\webserviceutils.jar: Error deleting D:\0613.12\ws1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wpClientEAR.ear\wpClient.war\WEB-INF\lib\webserviceutils.jar
!STACK 0
java.lang.Exception: Error deleting D:\0613.12\ws1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wpClientEAR.ear\wpClient.war\WEB-INF\lib\webserviceutils.jar
	at org.eclipse.jst.server.core.PublishUtil.copyFile(PublishUtil.java:127)
	at org.eclipse.jst.server.core.PublishUtil.copyFile(PublishUtil.java:162)
	at org.eclipse.jst.server.core.PublishUtil.smartCopy(PublishUtil.java:278)
	at org.eclipse.jst.server.core.PublishUtil.smartCopy(PublishUtil.java:284)
	at org.eclipse.jst.server.core.PublishUtil.smartCopy(PublishUtil.java:284)
Comment 1 Allan Zhang CLA 2006-04-05 10:55:49 EDT
Similar problem in WTP 1.5 https://bugs.eclipse.org/bugs/show_bug.cgi?id=120709
Comment 2 Tim deBoer CLA 2006-05-11 12:55:53 EDT
Created attachment 41160 [details]
Patch to check timestamps during smart publish

The problem was already found and fixed on the 1.5 stream. The smartPublish() method has not been checking timestamps on files and as a result republishes every file, every single time.
This patch backports the critical parts of the solution from 1.5 and does not include better messages on failure or publishing retries. The change is to check timestamps and only publish required files, which is a huge performance fix and avoid touching files that haven't been changed and are locked by the server. Adopter has already tested this patch and the changes have been running fine in 1.5.
Comment 3 Arthur Ryman CLA 2006-05-11 14:31:12 EDT
+1 for WTP 1.0.3 since this is a known fix in 1.5 and is a severe problem.
Comment 4 Tim Wagner CLA 2006-05-11 20:04:28 EDT
+1 for 1.0.3 inclusion
Comment 5 Naci Dai CLA 2006-05-12 03:40:50 EDT
+1 for 1.0.3 inclusion
Comment 6 Tim deBoer CLA 2006-05-16 14:55:41 EDT
Fix released to 1.0.3 stream.
Comment 7 Allan Zhang CLA 2006-09-26 12:09:56 EDT
VERIFIED 
Comment 8 Allan Zhang CLA 2006-09-26 12:10:35 EDT
Close the problem.
Comment 9 Eclipse Genie CLA 2017-10-11 16:01:42 EDT
New Gerrit change created: https://git.eclipse.org/r/107841