Bug 311448

Summary: random build/compile error due to out of sync files
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.j2eeAssignee: Carl Anderson <ccc>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: major    
Priority: P1 CC: david_williams, jsholl
Version: 3.0.5Flags: david_williams: pmc_approved+
jsholl: pmc_approved? (raghunathan.srinivasan)
jsholl: pmc_approved? (naci.dai)
jsholl: pmc_approved? (deboer)
jsholl: pmc_approved? (neil.hauge)
jsholl: pmc_approved? (kaloyan)
cbridgha: review+
jsholl: review+
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Bug Depends on: 303070, 303635    
Bug Blocks: 313608    
Attachments:
Description Flags
Initial refresh fix none

Description Carl Anderson CLA 2010-05-03 17:52:39 EDT
We didn't go far enough with the previous bugs.  Simply put, if we find that one of the essential files for the classpath - the .component file, the Deployment Descriptor, or the MANIFEST.MF - are out of synch with the file system, we should refresh all of them.

Note:  The OutOfMemoryErrors that are frequently occurring are surfacing this issue even more.

+++ This bug was initially created as a clone of Bug #303635 +++

This bug is to get the fix into HEAD for WTP 3.2.

+++ This bug was initially created as a clone of Bug #303070 +++

An adopter product is seeing a condition where the deployment descriptor of an EAR is out of sync with the file system.  This results in a partial load of the EAR's deployment descriptor:
1) The deployment descriptor node does not appear in Project Explorer
2) In the Java EE Module Dependencies, only one of many modules that should be selected are selected
3) The ClasspathContainer is thus flawed, with many compilation errors due to the fact that classes in modules that should be included in the classpath via the EAR Libraries are not, due to #2
Comment 1 Carl Anderson CLA 2010-05-03 17:56:55 EDT
Created attachment 166877 [details]
Initial refresh fix

We already have great checks in place to see if the component file and the deployment descriptor are in synch.  Let's simply refresh the entire project's contents if either of these crucial files is already out of synch.
Comment 2 Chuck Bridgham CLA 2010-05-04 15:05:03 EDT
approved
Comment 3 Jason Sholl CLA 2010-05-05 10:28:00 EDT
    * Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

If a users workspace becomes out of synch (likely because of 3rd party SCMs), it is necessary to synch up the workspace.  If this is not done, WTP will not work properly and it is very unlikely the user will know how to fix their workspace.

    * Is there a work-around? If so, why do you believe the work-around is insufficient? 

Perform a manual resynch and restart.

    * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

Tested manually; no JUnits.

    * Give a brief technical overview. Who has reviewed this fix? 

Carl created the fix, Chuck Bridgham and Jason Sholl reviewed it

    * What is the risk associated with this fix? 

minimal
Comment 4 Carl Anderson CLA 2010-05-06 14:25:09 EDT
Committed to HEAD for WTP 3.2 RC1