This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 310164 - IllegalStateException logged when deleting Web 2.5 project
Summary: IllegalStateException logged when deleting Web 2.5 project
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.jem (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Dimitar Giormov CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-22 13:23 EDT by Kaloyan Raev CLA
Modified: 2010-05-19 23:56 EDT (History)
1 user (show)

See Also:
dimitar.giormov: pmc_approved? (david_williams)
dimitar.giormov: pmc_approved? (raghunathan.srinivasan)
dimitar.giormov: pmc_approved? (naci.dai)
deboer: pmc_approved+
dimitar.giormov: pmc_approved? (neil.hauge)
dimitar.giormov: pmc_approved? (kaloyan)
cbridgha: review+


Attachments
stack trace (7.92 KB, text/plain)
2010-04-22 13:23 EDT, Kaloyan Raev CLA
no flags Details
fix (7.85 KB, patch)
2010-05-18 07:55 EDT, Dimitar Giormov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kaloyan Raev CLA 2010-04-22 13:23:16 EDT
Created attachment 165808 [details]
stack trace

An IllegalStateException was logged in the Error Log when I deleted a Web 2.5 project. 

See the attached stack trace.
Comment 1 Carl Anderson CLA 2010-04-22 21:33:43 EDT
Assigning to Chuck for initial investigation.

We fixed something similar not too long ago- there needs to be a check to see if the project is being closed/deleted before we try getting the resource set.
Comment 2 Chuck Bridgham CLA 2010-04-28 20:47:19 EDT
sending back to Kaloyan...

The ModelProvider class needs to check id the project is accesible  (because its being deleted)  and fail gracefully.
Comment 3 Kaloyan Raev CLA 2010-04-29 06:13:26 EDT
Dimitar, please change the logic in the ModelProvider as Chuck suggests.
Comment 4 Dimitar Giormov CLA 2010-05-18 07:55:55 EDT
Created attachment 168899 [details]
fix

This adds a check if the project is accessible during getModelObject call, and throws exception if it is not.
Additionally in content providers if the project is not accessible creation of the DD node is canceled and the provider is not added to the cache.
Comment 5 Dimitar Giormov CLA 2010-05-18 08:01:01 EDT
Chuck can you review this.
Comment 6 Chuck Bridgham CLA 2010-05-18 10:57:52 EDT
approve - 

This is a good change - but we need to test

Please test this well..  I don't see any fixes for catching these exceptions...  do we handle gracefully?
Comment 7 Dimitar Giormov CLA 2010-05-19 07:30:33 EDT
    * Exception is thrown on deletion of Web 2.5 project in console and error log.
    * no workaround
    * Fix was tested manually
    * The fix adds a check for inaccessible projects on model request operation, if the project is not accessible IllegalArgumentException is thrown with correct message. Additionally the Content providers for the model are altered to try not to acquire the model children if the project is not accessible.
    * low risk - since effectively the model is now throwing the same exception, but with correct message.
Comment 8 Dimitar Giormov CLA 2010-05-19 09:01:26 EDT
committed and released in HEAD.