Community
Participate
Working Groups
Build Identifier: I20100119-0800 When republishing a project it gets removed from the server instead of updating the file. Reproducible: Always Steps to Reproduce: 1.Create a new dynamic web project and a jsp file. 2.Start a server and add the project to it. 3.Make a change on the jsp file and run it on the server. 4.The server will say it republished but the web browser will return a 404 error. 5.Viewing the wtpwebapps/project folder shows no files in it anymore.
Not sure if this is affecting all server adapters yet, but for now I am increasing this to P2. Alex, can you try other server adapters, perhaps the J2EE preview?
Tomcat 6.0 was the adapter I used that caused the bug. Tested J2EE preview and it works correctly. (In reply to comment #1) > Not sure if this is affecting all server adapters yet, but for now I am > increasing this to P2. > > Alex, can you try other server adapters, perhaps the J2EE preview?
Same issue in Tomcat 5.5 As soon as you make a change to the jsp file on the server the project gets removed. So even trying to refresh the browser page without republishing or restarting the server shows a 404 error instead of the file before the changes. HTTP Preview works.
The problem seems to be related to changes in the JEE side of things. During the Delta calculation we put the result of pm.members() in an array, we compare each resource already deployed with the list given back from pm.members(). As we move in the array to determine if the resource is ADDED, CHANGED, REMOVED, NO_CHANGE we remove elements from the array. This logic is failing, because the elements of pm.members do not .equal to be the same, thus the resources are being reported twice, as ADDED, and as REMOVED.
we figured out it was a problem with the new instances of IModuleFile/IModuleFolder not implementing equals.....
Created attachment 156985 [details] patch Adding equals() and hashcode()
Created attachment 156988 [details] removed println
I tested the patch attached and publishing is now working correctly. I tested adding and removing files and folders, and everything gets to the publishing directory.
This is in the build