| Summary: | JEEDeployableFactory causing NPE because of invalid cache | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Web Tools | Reporter: | Jason Sholl <jsholl> | ||||||
| Component: | J2EE Standard Tools | Assignee: | Jason Sholl <jsholl> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | arvera, ccc | ||||||
| Version: | 3.0.3 | Flags: | cbridgha:
review+
|
||||||
| Target Milestone: | 3.0.4 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 2000 | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 342469 | ||||||||
| Attachments: |
|
||||||||
Created attachment 123302 [details]
patch for 3.0.4
Created attachment 123303 [details]
patch for 3.0.4
approved Committed to R3_0_maintenance for 3.0.4 |
An adopter product is running into NPEs in org.eclipse.wst.server.core.internal.Module.getDelegate(Unknown Source) which are actually caused by the cache in JEEDeployableFactory being inappropriately cleared by the server.core Module API. java.lang.NullPointerException at org.eclipse.wst.server.core.internal.Module.getDelegate(Unknown Source) at org.eclipse.wst.server.core.internal.Module.loadAdapter(Unknown Source) Currently, a fix for the server.core Module API is not available (tracking with another bug by the server team), but there is a simple fix is possible with changes only to the JEEDeployableFactory. First is to only clear the appropriate portion of the cache by moving off the clearCache() method and onto the clearCache(IProject) method. Second is to update the getModule() method to now lazily load the module if it is not found in the cache. While this problem has only been reproduced in cases with the JEEDeployableFactory, the J2EEDeployableFactory should also be fixed because a problem may arise there as well.