Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321529 - NPE when opening any source editor if JSP plug-ins are not loaded
Summary: NPE when opening any source editor if JSP plug-ins are not loaded
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 major with 1 vote (vote)
Target Milestone: 3.2.2   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-02 13:09 EDT by Ian Tewksbury CLA
Modified: 2010-09-01 00:30 EDT (History)
4 users (show)

See Also:
nsand.dev: review+


Attachments
patch against 3.2.1 (848 bytes, patch)
2010-08-02 14:03 EDT, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2010-08-02 13:09:01 EDT
If a user attempts to open any source editor (HTML, XML, CSS) without the JSP plugins loaded then the source editor will open but have an error message saying:

Could not open the editor: An unexpected exception was thrown.
java.lang.NullPointerException
	at org.eclipse.wst.sse.ui.StructuredTextEditor.calculatePriority(Unknown Source)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.installCharacterPairing(Unknown Source)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(Unknown Source)
...
Comment 1 Nitin Dahyabhai CLA 2010-08-02 14:03:20 EDT
Created attachment 175725 [details]
patch against 3.2.1
Comment 2 Nick Sandonato CLA 2010-08-02 14:34:59 EDT
Simple fix for a severe problem.
Comment 3 Litrik De Roy CLA 2010-08-03 03:14:17 EDT
I was hit by this after the upgrade of WTP to 3.2.1. Had to revert back to 3.2.0 to be able to open HTML, XML, XSL and PHP files.
Comment 4 David Williams CLA 2010-08-03 03:41:45 EDT
What fix caused this regression? 

I guess you know this, but will say it anyway ... I think this would emphasize the need a little better testing of "reduced" installs? 

We may also want to consider running "xml, html, and css unit tests' in a "reduced" install during the junit tests. That'd be a lot of work, but might help avoid this kind of problem in future. 

(Ironic ... I remember when a main reason we'd do smoke testing in 'source editing' was just to make sure the editors all opened ... there were so many cases where unit tests would pass but editors wouldn't open, or you couldn't type, or something ... years and years ago). 


Litrik, what do you install exactly that you ran into this problem? Just roll your own? Or is there some wide-spread distribution that surfaces this problem?
Comment 5 Litrik De Roy CLA 2010-08-03 03:50:30 EDT
(In reply to comment #4)
> Litrik, what do you install exactly that you ran into this problem? Just roll
> your own? Or is there some wide-spread distribution that surfaces this problem?

I started with a clean install of Eclipse 3.6 Classic and added some parts of WTP.

I don't use JSP at all so I install only those parts of WTP that will give me XML, HTML, CSS and JavaScript editors. Currently I have installed the following features:

Eclipse Faceted Project Framework
 Version: 3.2.1.v201007151559-377A88s73533F5H384A
JavaScript Development Tools
 Version: 1.2.0.v201005270528-7C78FGDF9JgLWLMBWz-Ose6
Eclipse Web Developer Tools
 Version: 3.2.0.v201005241510-7O7CFb3EMf84nP-FHuc10NTz--M3
Eclipse XML Editors and Tools
 Version: 3.2.0.v201005241510-7H7AFUIDxumQGOb7ocjUR2Pvz-28
Eclipse XSL Developer Tools
 Version: 1.1.3.v201006151143-67K0BgJ9DIATEXATHP
Eclipse XSL Developer Tools
 Version: 1.1.0.v201005241600-7S7WFAKFIpS---NRIS1pbfYBUIQ
Comment 6 Nitin Dahyabhai CLA 2010-08-03 04:13:02 EDT
(In reply to comment #4)
> What fix caused this regression? 

It was triggered by the changes for bug 276702 referring to a content type in a plug-in not included by that plug-ins required features, but the flaw was introduced as part of the fix for bug 294088.
Comment 7 Nitin Dahyabhai CLA 2010-08-10 07:28:10 EDT
Released to 3.2.2.
Comment 8 jdance CLA 2010-08-16 19:36:50 EDT
Is there anyway this could get pushed out before SR1?

The standard 3.6 JavaScript build exhibits this problem after updating a feature that depends upon JSDT. We have the following plugin dependencies:  

org.eclipse.wst.jsdt.core
org.eclipse.wst.jsdt.ui
org.eclipse.wst.sse.core
org.eclipse.wst.html.core
org.eclipse.wst.sse.ui
org.eclipse.wst.jsdt.debug.core
org.eclipse.wst.jsdt.debug.ui
org.eclipse.wst.xml.ui

To reproduce:
1. Download and install eclipse-javascript-helios-win32-x86_64.zip
2. Create a Static Web Project, add index.html
3. Add our feature that has the dependencies above, and don't un-check "Contact all update sites during install..."
4. Restart as directed

Editing html is now broken.
Comment 9 Nitin Dahyabhai CLA 2010-09-01 00:30:41 EDT
(In reply to comment #8)
> Is there anyway this could get pushed out before SR1?

Installing the JST Web feature also gets around the problem.