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

Bug 314467

Summary: Exception thrown on resource change of a binary plugin project
Product: [WebTools] WTP Java EE Tools Reporter: Jason Peterson <jasonpet>
Component: jst.j2eeAssignee: Jason Peterson <jasonpet>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, jsholl, raghunathan.srinivasan, stryker
Version: 3.2Flags: jsholl: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
jsholl: pmc_approved? (naci.dai)
deboer: pmc_approved+
jsholl: pmc_approved? (neil.hauge)
jsholl: pmc_approved? (kaloyan)
cbridgha: review+
Target Milestone: 3.2 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Bug Depends on:    
Bug Blocks: 314548    
Attachments:
Description Flags
patch none

Description Jason Peterson CLA 2010-05-26 10:25:49 EDT
Created attachment 170000 [details]
patch

I get the exception shown below on any resource change involving a binary plugin project.  The reasons is because it has the wrong Path for the project.  This is a regression issue caused by cleanup changes made in bug 305959.  To recreate simply import a plugin project as binary.  


org.eclipse.jst.jee.archive.ArchiveOpenFailureException: C:\abcplugin\abcplugin_1.0.0.201005211607.jar
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentLoadAdapter.<init>(JavaEEBinaryComponentLoadAdapter.java:43)
	at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.openBinaryArchive(JavaEEArchiveUtilities.java:228)
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper$ArchiveCache.openArchive(JavaEEBinaryComponentHelper.java:536)
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.openArchive(JavaEEBinaryComponentHelper.java:395)
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.getUniqueArchive(JavaEEBinaryComponentHelper.java:384)
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.getArchive(JavaEEBinaryComponentHelper.java:377)
	at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.getJavaEEQuickPeek(JavaEEBinaryComponentHelper.java:73)
	at org.eclipse.jst.j2ee.project.JavaEEProjectUtilities.isJEEComponent(JavaEEProjectUtilities.java:437)
	at org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities.isJEEProject(J2EEProjectUtilities.java:960)
	at org.eclipse.jst.jee.internal.deployables.JEEDeployableFactory.canHandleProject(JEEDeployableFactory.java:62)
	at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.createModuleDelegates(J2EEDeployableFactory.java:123)
	at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.createModules(J2EEDeployableFactory.java:89)
	at org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate.cacheModules(ProjectModuleFactoryDelegate.java:59)
	at org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate.getModules(ProjectModuleFactoryDelegate.java:255)
	at org.eclipse.wst.server.core.internal.ModuleFactory.getModules(ModuleFactory.java:131)
	at org.eclipse.wst.server.core.ServerUtil.getModules(ServerUtil.java:96)
	at org.eclipse.wst.server.core.internal.ResourceManager.publishHandleProjectChange(ResourceManager.java:976)
	at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener$1.visit(ResourceManager.java:123)
Comment 1 Chuck Bridgham CLA 2010-05-26 13:52:56 EDT
approve
Comment 2 Jason Sholl CLA 2010-05-26 14:06:51 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 blowing up the stack for an adopter product

    * 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? 

This has been tested with the UI and with JUnits.

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

If the java.io.File is not adapted properly, then check the IFile.  This is actually reverting previous behavior.  Chuck has reviewed this fix.  Also will be opening another defect to track a better fix for post 3.2 for fixing the adapter code so a java.io.File is properly returned.

    * What is the risk associated with this fix? 

None
Comment 3 Jason Sholl CLA 2010-05-26 17:38:01 EDT
checked into head for wtp 3.2 rc3