Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 380735

Summary: EclipseLink static weaving builder is not removed when JPA facet is removed
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JPAAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P1 CC: nan.n.li, neil.hauge, tranle1
Version: 3.2Flags: neil.hauge: pmc_approved? (david_williams)
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved+
neil.hauge: pmc_approved? (kaloyan)
neil.hauge: pmc_approved? (cbridgha)
neil.hauge: review+
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC
Attachments:
Description Flags
proposed patch against HEAD none

Description Karen Butzke CLA 2012-05-25 17:13:19 EDT
Create a new JPA EclipseLink 2.4 project
Open the project properties ->JPA -> EclipseLink and turn on static weaving. Press OK.
Open project properties ->Project Facets and remove the JPA facet.
Close Eclipse and restart. I was unable to restart Eclipse and received several exceptions. Now I can't reproduce the problem, so I don't have the stack trace, but I know I solved it by removing the eclipselink static weaving builder from my project's metadata. We should be removing it when the JPA facet is uninstalled.
Comment 1 Neil Hauge CLA 2012-05-25 17:16:57 EDT
We should consider for RC2 or RC3 as this can be pretty catastrophic.
Comment 2 Karen Butzke CLA 2012-05-25 17:18:43 EDT
Created attachment 216318 [details]
proposed patch against HEAD

This patch remove the static weaving builder in the Jpa facet uninstall delegate. This is the lowest risk, simplest place to put the fix for RC2. Really this should be done in the eclipselink plug-in instead of the jpt.jpa.core plugin.
Comment 3 Neil Hauge CLA 2012-05-29 10:13:29 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. 

Can sometimes result in a broken workbench launch as noted in comment 0.

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

Manually remove builder from project metadata.  This would not be obvious to the end user.

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

Tested with automated and manual tests.

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

See comment 2.  I have reviewed the fix.

    What is the risk associated with this fix? 

Low risk.  Isolated to JpaFacetRemoval.
Comment 4 Neil Hauge CLA 2012-05-29 10:44:21 EDT
Approving so we can move ahead with a respin.
Comment 5 Tran Le CLA 2012-05-29 12:27:28 EDT
Patch committed and released.
Resolved in RC2.
Comment 6 Nan Li CLA 2012-05-29 16:24:22 EDT
The patch is working when directly hitting OK after uncheck JPA facet; however, the eclipselink static weaving builder cannot get removed if first hitting Apply and then hitting OK.