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

Bug 322646

Summary: No IDataModel adapter for JavaFacetInstallConfig if o.e.jst.common.frameworks plugin hasn't loaded
Product: [WebTools] WTP Common Tools Reporter: Paul Fullbright <paul.fullbright>
Component: wst.commonAssignee: Konstantin Komissarchik <konstantin>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: major    
Priority: P3 CC: david_williams, neil.hauge
Version: 3.2   
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on:    
Bug Blocks: 322598    
Attachments:
Description Flags
proposed patch konstantin: iplog+

Description Paul Fullbright CLA 2010-08-13 08:57:29 EDT
Problem results in a NPE in FacetProjectCreationDataModelProvider.

Solution is to use loadAdapter( .. ) rather than getAdapter( .. ), which forces the plugin to be loaded so the adapter may be used.
Comment 1 Paul Fullbright CLA 2010-08-13 08:59:41 EDT
Created attachment 176550 [details]
proposed patch

This replaces the getAdapter( .. ) call with loadAdapter( .. ).

I've tested this and it solves the problem in JPT.  I have not performed any WTP common tests.
Comment 2 Neil Hauge CLA 2010-08-13 09:25:59 EDT
This fix solves a very serious bug in Dali (see blocked bug 322598).

If possible, it would be great if we could get this into the final M1 build, although I'm not sure it would be feasible to do so given the timing and the likely need for additional team's smoke testing after the proposed change.
Comment 3 Carl Anderson CLA 2010-08-13 14:48:56 EDT
Konstantin, you put in the getAdapterManager() call with bug 219996 .  Can you please handle this bug?
Comment 4 Carl Anderson CLA 2010-08-13 17:19:25 EDT
Retargetting to WTP 3.3 M2 since M1 was just declared.  Konstantin- if you are comfortable doing so, we can put this into WTP 3.2.2.  (Which might be nice, since org.eclipse.wst.modulecore has not branched yet.)
Comment 5 Neil Hauge CLA 2010-08-13 21:21:48 EDT
We don't specifically need this change in 3.2.2 so there is no need to make this change in maintenance on our behalf.
Comment 6 Konstantin Komissarchik CLA 2010-08-16 16:45:55 EDT
The fix is desirable in 3.2 maintenance too. I have committed the patch to HEAD and released with the same tag to 3.2.2 and 3.3 M2 map files.