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

Bug 313402

Summary: Opener of Archive didn't close a file
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 Flags: 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+
Version: 3.0.5   
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Bug Depends on: 313399    
Bug Blocks:    
Attachments:
Description Flags
patch - same as for 305P none

Description Jason Sholl CLA 2010-05-18 13:23:25 EDT
Cloning for 3.2

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

The following exception was logged because of a small hole where an IArchive may not necessarily be closed.  The fix is to close that hole by ensuring the IArchive is added to the list of IArchives to close.  In addition to logging exceptions like this one, orphaned open IArchives can hold onto file locks until the workbench is shut down so it is important that this gap be closed.

java.lang.Exception
	at org.eclipse.jst.j2ee.internal.archive.operations.ComponentLoadStrategyImpl.<init>(ComponentLoadStrategyImpl.java:210)
	at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentLoadStrategyImpl.<init>(WebComponentLoadStrategyImpl.java:39)
	at org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit.asArchive(WebArtifactEdit.java:641)
	at org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit.asArchive(WebArtifactEdit.java:633)
	at org.eclipse.jst.j2ee.internal.archive.operations.EARComponentLoadStrategyImpl.addModulesAndUtilities(EARComponentLoadStrategyImpl.java:123)
	at org.eclipse.jst.j2ee.internal.archive.operations.EARComponentLoadStrategyImpl.getFiles(EARComponentLoadStrategyImpl.java:62)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl.collectFiles(LoadStrategyImpl.java:286)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl.getFiles(ContainerImpl.java:237)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl.getFile(ContainerImpl.java:197)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl.initModuleFileFromEAR(ModuleRefImpl.java:122)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl.getModuleFile(ModuleRefImpl.java:106)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.getModuleFile(EARFileImpl.java:93)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.getDeploymentDescriptor(EARFileImpl.java:333)
	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl.getDeploymentDescriptor(ModuleRefImpl.java:165)
	at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validateWebAppRefs(EarValidator.java:440)
	at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validateRefs(EarValidator.java:397)
	at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validate(EarValidator.java:122)
	at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validateInJob(EarValidator.java:144)
	at org.eclipse.jst.j2ee.internal.validation.UIEarValidator.validateInJob(UIEarValidator.java:276)
	at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Jason Sholl CLA 2010-05-18 13:25:33 EDT
Created attachment 168974 [details]
patch - same as for 305P
Comment 2 Chuck Bridgham CLA 2010-05-18 20:18:35 EDT
approve
Comment 3 Jason Sholl CLA 2010-05-19 09:01:04 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. 

IArchives must be closed; if they are not, it is possible the user will need to close and restart the workbench in order to proceed with their work.

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

No work around

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

No specific JUnit is necessary; the regression bucket has been run.

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

Chuck and Jason have reviewed

    * What is the risk associated with this fix? 

None
Comment 4 Jason Sholl CLA 2010-05-19 10:32:34 EDT
code checked into head for wtp 3.2 rc2