Bug 311448 - random build/compile error due to out of sync files
Summary: random build/compile error due to out of sync files
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on: 303070 303635
Blocks: 313608
  Show dependency tree
 
Reported: 2010-05-03 17:52 EDT by Carl Anderson CLA
Modified: 2010-05-19 15:19 EDT (History)
2 users (show)

See Also:
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+


Attachments
Initial refresh fix (2.11 KB, patch)
2010-05-03 17:56 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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