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

Bug 319617

Summary: org.eclipse.core.runtime.CoreException caused from fix for 312288
Product: [WebTools] WTP Java EE Tools Reporter: Neeraj Agrawal <nagrawal>
Component: jst.servletAssignee: Neeraj Agrawal <nagrawal>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: david_williams, jsholl
Version: unspecifiedFlags: david_williams: pmc_approved+
nagrawal: pmc_approved? (raghunathan.srinivasan)
nagrawal: pmc_approved? (naci.dai)
deboer: pmc_approved+
nagrawal: pmc_approved? (neil.hauge)
nagrawal: pmc_approved? (kaloyan)
cbridgha: review+
Target Milestone: 3.2.1   
Hardware: PC   
OS: Windows 7   
Whiteboard: PMC_approved
Attachments:
Description Flags
patch none

Description Neeraj Agrawal CLA 2010-07-12 13:26:10 EDT
Build Identifier: 3.2.1

In adopter product the following exceptions are observerd

org.eclipse.core.runtime.CoreException: No property tester contributes a property org.eclipse.core.resources.webResource to type class org.eclipse.jst.javaee.web.internal.impl.WebAppImpl
    at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:123)
    at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
    at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
    at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53)
    at org.eclipse.ui.internal.navigator.NavigatorPlugin$Evaluator.run(NavigatorPlugin.java:245)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.navigator.NavigatorPlugin.safeEvaluate(NavigatorPlugin.java:260)
    at org.eclipse.ui.internal.navigator.wizards.CommonWizardDescriptor.isEnabledFor(CommonWizardDescriptor.java:138)
    at org.eclipse.ui.internal.navigator.wizards.CommonWizardDescriptorManager.getEnabledCommonWizardDescriptors(CommonWizardDescriptorManager.java:152)
    at org.eclipse.ui.navigator.WizardActionGroup.setContext(WizardActionGroup.java:193)
    at org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider.fillContextMenu(NewActionProvider.java:107)
    at org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:221)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:216)
    at org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:173)
    at org.eclipse.ui.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:260)
    at org.eclipse.ui.navigator.CommonNavigatorManager$4.menuAboutToShow(CommonNavigatorManager.java:275)
    at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:338)



The reason exception is thrown since in this case none of the criteria  satisfies instanceof checks and then propertytester  org.eclipse.jst.j2ee.navigator.internal.WebResourcePropertyTester is invoked which is designed to  work with IResource only. 

The check for propertytester seems unnecessary and i am attaching the patch which removed the check.


Reproducible: Always
Comment 1 Neeraj Agrawal CLA 2010-07-12 13:27:02 EDT
Created attachment 174069 [details]
patch
Comment 2 Chuck Bridgham CLA 2010-07-12 13:29:34 EDT
approved
Comment 3 Neeraj Agrawal CLA 2010-07-12 16:02:05 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. 

The defect caused exception logged in several use cases


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

Tested by manually running scenarios

* Give a brief technical overview. Who has reviewed this fix? 
See technical overview in original bug report. Chuck Bridgham has reviewed the fix.


* What is the risk associated with this fix? 
The fix is simple should not cause regression or affect any other area.
Comment 4 Jason Sholl CLA 2010-07-13 10:42:37 EDT
code checked into head for WTP 3.2.1