Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328320 - NPE in EarUtilities.getReferencingEARProjects()
Summary: NPE in EarUtilities.getReferencingEARProjects()
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.0.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5 P   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-21 03:42 EDT by Szymon Ptaszkiewicz CLA
Modified: 2010-11-17 16:18 EST (History)
2 users (show)

See Also:
cbridgha: review+


Attachments
Stack traces (59.00 KB, text/plain)
2010-10-21 03:42 EDT, Szymon Ptaszkiewicz CLA
no flags Details
Ensure null entries are not added to the list (1.54 KB, patch)
2010-10-29 14:18 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Ptaszkiewicz CLA 2010-10-21 03:42:22 EDT
Created attachment 181366 [details]
Stack traces

After (or even during event broadcasting) PSF import there is NPE thrown while trying to call EarUtilities.getReferencingEARProjects() in line 187. Stack traces attached. Starting at some point all stack traces look exactly the same. After the PSF import there are also unwanted changes in file org.eclipse.wst.common.component. The bug came out while working on bug 301223.
Comment 1 Carl Anderson CLA 2010-10-21 14:50:25 EDT
Szymon, what version of Eclipse are you using?  It looks like the original bug was opened against Eclipse 3.5.1 (which corresponds to WTP 3.1.1).
Comment 2 Szymon Ptaszkiewicz CLA 2010-10-25 08:33:27 EDT
(In reply to comment #1)
> Szymon, what version of Eclipse are you using?  It looks like the original bug
> was opened against Eclipse 3.5.1 (which corresponds to WTP 3.1.1).

Yes, the original bug was opened against 3.5.1 but one of the duplicates was against 3.4.2. I updated the version of Eclipse accordingly there. The version of WTP is 3.0.5.
Comment 3 Szymon Ptaszkiewicz CLA 2010-10-27 09:12:10 EDT
Carl, could you tell what the root cause of this exception may be?
Comment 4 Paul Christopher CLA 2010-10-27 14:06:57 EDT
Adding myself to CC list
Comment 5 Carl Anderson CLA 2010-10-29 14:18:28 EDT
Created attachment 182071 [details]
Ensure null entries are not added to the list

The cause of the NPE is the fact that the list of referencing components returned from VirtualComponent.getReferencingComponents() could contain a null.  The patch will prevent the null entry from being added to the list.
Comment 6 Chuck Bridgham CLA 2010-11-08 10:54:52 EST
approve
Comment 7 Carl Anderson CLA 2010-11-17 16:18:06 EST
Committed to R3_0_5_patches