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

Bug 323757

Summary: EAR Libraries Classpath Container picking up non MANIFEST references
Product: [WebTools] WTP Java EE Tools Reporter: Jason Sholl <jsholl>
Component: jst.j2eeAssignee: Jason Sholl <jsholl>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2Flags: jsholl: pmc_approved? (david_williams)
jsholl: pmc_approved? (raghunathan.srinivasan)
jsholl: pmc_approved? (naci.dai)
deboer: pmc_approved+
jsholl: pmc_approved? (neil.hauge)
jsholl: pmc_approved? (kaloyan)
cbridgha: review+
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard: PMC_approved
Attachments:
Description Flags
Patch for 3.2.2 none

Description Jason Sholl CLA 2010-08-26 16:37:12 EDT
The EAR Libraries classpath container was designed to pick up exactly two kinds of references 1. those specified in the META-INF/MANIFEST.MF Class-Path, and 2. those mapped directly to the EAR's lib directory (for 5.0 and above EARs).

The implementation, however, is picking up all references defined by the component file.  In previous releases of WTP this was not an issue because there was no way to add references to the component file use the UI.  Now, in 3.2, with the new Deployment Assembly page, it is possible, so the EAR Libraries classpath container needs to be more careful.

Here's a way to reproduce:

1. Create an EJB project with an EAR

2. In the EJB project,  open deployment assembly page and add reference to Archive/External Archive/Variable.  The EAR libaries container is updated.  This is a bug since  EAR libraries container should show entries from EJB manifest  and jars placed inside EAR lib.
Comment 1 Jason Sholl CLA 2010-08-26 16:38:44 EDT
Created attachment 177565 [details]
Patch for 3.2.2
Comment 2 Chuck Bridgham CLA 2010-08-26 16:44:33 EDT
approved
Comment 3 Jason Sholl CLA 2010-08-27 10:44:49 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. 

This is a problem 3.2 users will start seeing; it is not likely that any previous users ever ran into this.

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

No

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

Tested with UI and tested with JUnits

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

Ensure only manifest classpath references are considered.  Chuck reviewed this fix.

    * What is the risk associated with this fix? 

None
Comment 4 Jason Sholl CLA 2010-08-30 14:59:25 EDT
code checked into head for WTP 3.2.2 and 3.3