Community
Participate
Working Groups
Build Identifier: WTP 3.2 Got the following exception in the .log file : org.eclipse.core.internal.resources.ResourceException: Resource '/MinibankEJB/ejbModule/com/ibm/websphere/csi/_TransactionalObject_Stub.class' does not exist. at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:317) at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:194) at org.eclipse.core.internal.resources.Resource.checkAccessibleAndLocal(Resource.java:200) at org.eclipse.core.internal.resources.Resource.setSessionProperty(Resource.java:1640) at org.eclipse.wst.validation.internal.ValManager.putValProperty(ValManager.java:919) We can add a check of the resource in the ValManager class to make sure the resource exists. Reproducible: Always
Created attachment 169407 [details] Add the check of resource.exists()
I approve of this change.
The problem is the validation framework didn't check if the resource does exist or not before doing the validation on the resource. If a resource is deleted by the user while the validation is running, the ResourceException message will be logged. There is no workaround. The fix is to add a checking in the validation framework to check if the resource exists. The fix is very simple and safe. I tested it by deleting a resource during validation and there is no exception logged. Also ran the test (manual and build validation) to ensure no regression.
Resource#setSessionProperty() is calling Resource#checkAccessible(), not just Resource#checkExists() directly. Shouldn't we then call IResource.isAccessible() as well?
Created attachment 170089 [details] Add the check of resource.isAccessible()
Nitin is correct - checking to see isAccessible() will prevent this from being done on closed projects. I approve of the updated patch.
Committed to HEAD for WTP 3.2 RC3
Closing.