| Summary: | Cycle errors detected when import an EAR with JPA and Utility jars as projects. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Jason Sholl <jsholl> | ||||||
| Component: | jst.j2ee | Assignee: | Jason Sholl <jsholl> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ccc, david_williams | ||||||
| Version: | 3.2 | Flags: | 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+ |
||||||
| Target Milestone: | 3.2.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows Server 2003 | ||||||||
| Whiteboard: | PMC_approved | ||||||||
| Attachments: |
|
||||||||
|
Description
Jason Sholl
Created attachment 175071 [details]
ear
The problem occurs when the component file is setup like this:
<dependent-module archiveName="lib/MyJPA.jar" deploy-path="/" handle="module:/resource/MyJPA/MyJPA">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="lib/MyUtility.jar" deploy-path="/" handle="module:/resource/MyUtility/MyUtility">
<dependency-type>uses</dependency-type>
As opposed to this:
<dependent-module archiveName="MyUtility.jar" deploy-path="/lib" handle="module:/resource/MyUtility/MyUtility">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="MyJPA.jar" deploy-path="/lib" handle="module:/resource/MyJPA/MyJPA">
<dependency-type>uses</dependency-type>
</dependent-module>
The EAR Libraries classpath container needs to handle the first case when determining whether modules are mapped to the lib folder. The attached fix does exactly that.
Created attachment 175072 [details]
patch for 3.2.1
approved. older workspaces (3.1.x) will create the old style - need to handle these cases * 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 regression was introduced in WTP 3.2 and will impact users migrating from previous versions of WTP. This is also reproducible for current 3.2 users importing EAR files
* Is there a work-around? If so, why do you believe the work-around is insufficient?
The component file needs to be updated; either by hand, or by using the deployment assembly page. To update with the deployment assembly page the utilities need to be removed and then readded.
* 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 JUnits
* Give a brief technical overview. Who has reviewed this fix?
Make sure both the runtimePath and the archiveName fields are considered when determining whether this maps to the lib folder.
* What is the risk associated with this fix?
none
Sounds like a good candidate for improved unit for functional testing? Committed to HEAD for WTP 3.3. (And tentatively WTP 3.2.1, assuming PMC approval) *** Bug 320129 has been marked as a duplicate of this bug. *** |