Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360645 - NullPointerException in wst.common.snippets when opening JSP
Summary: NullPointerException in wst.common.snippets when opening JSP
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: Snippets Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 06:27 EDT by Victor Homyakov CLA
Modified: 2012-04-25 21:01 EDT (History)
3 users (show)

See Also:


Attachments
Error log details (4.49 KB, text/plain)
2011-10-12 06:29 EDT, Victor Homyakov CLA
no flags Details
Patch to avoid the NPE (943 bytes, patch)
2011-11-30 04:23 EST, Dirk Olmes CLA
thatnitind: iplog+
Details | Diff
Somewhat different stacktrace (5.09 KB, text/plain)
2012-01-15 19:37 EST, Szczepan Holyszewski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Homyakov CLA 2011-10-12 06:27:30 EDT
Build Identifier: 20110916-0149

Sometimes when opening JSP file, Eclipse shows "Problem Occurred" popup which talks about NullPointerException in org.eclipse.wst.common.snippets.internal.SnippetTransfer.nativeToJava(SnippetTransfer.java:87).

Reproducible: Sometimes

Steps to Reproduce:
1. Open JSP.
Comment 1 Victor Homyakov CLA 2011-10-12 06:29:53 EDT
Created attachment 205015 [details]
Error log details
Comment 2 Dirk Olmes CLA 2011-11-30 04:20:17 EST
I see the same stack trace when opening new .java files with the snippets view active.
Comment 3 Dirk Olmes CLA 2011-11-30 04:23:24 EST
Created attachment 207711 [details]
Patch to avoid the NPE
Comment 4 Szczepan Holyszewski CLA 2012-01-15 19:29:18 EST
I get a NPE with similar stack trace, with the flows converging at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:610). Attaching the trace.
Comment 5 Szczepan Holyszewski CLA 2012-01-15 19:37:02 EST
Created attachment 209510 [details]
Somewhat different stacktrace

Forgot to add in the original comment that I receive it most of the time when a view that is placed in a tab is activated for the first time. For example, when I launch Eclipse and it reopens files in editors, I get one NPE immediately for the active tab. Then when I switch to other tabs, I get the NPE once for each tab, but not upon any subsequent switching to the tabs that had been activated at least once. For another example, I received this NPE when I opened the error log view, because it opened in a tab and immediately activated. I copied the stack trace from the most recent entry in the log, so it may well be the trace of the NPE that I got when opening the error log view.
Comment 6 Nitin Dahyabhai CLA 2012-04-25 21:01:19 EDT
Patch released, thanks, Dirk!