Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-12407

NPE initializing JBoss Tools web editors (xml, xhtml, etc) if source "on-demand hyperlinking" is disabled in Eclipse

XMLWordPrintable

    • Hide

      Install Eclipse Juno
      Install JBoss Tools Nightly
      Disable on-demand hyperlinking (Preferences > General > Editors > Text Editors > Hyperlinking )
      Restart eclipse
      Attempt to view an XML, XHTML, HTML, etc file in a JBoss Tools editor. The following error appears "Failed to create the part's controls", with the following stack trace:

      java.lang.NullPointerException
      at org.jboss.tools.jst.jsp.HTMLTextViewerConfiguration.getHyperlinkDetectors(HTMLTextViewerConfiguration.java:134)
      at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.configure(StructuredTextViewer.java:295)
      at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3416)
      at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
      at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
      at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1514)
      at org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor.createPartControl(JSPTextEditor.java:349)
      at org.jboss.tools.vpe.editor.VpeEditorPart.createPartControl(VpeEditorPart.java:527)
      at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart.addPage(JSPMultiPageEditorPart.java:93)
      at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPagesForVPE(JSPMultiPageEditor.java:543)
      at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPages(JSPMultiPageEditor.java:483)
      at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:358)
      at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:129)
      at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95)
      at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
      at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
      at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:837)
      at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)

      • Re-enable on-demand hyperlinking
      • close and re-open file, JBoss tools editors now function again.
      Show
      Install Eclipse Juno Install JBoss Tools Nightly Disable on-demand hyperlinking (Preferences > General > Editors > Text Editors > Hyperlinking ) Restart eclipse Attempt to view an XML, XHTML, HTML, etc file in a JBoss Tools editor. The following error appears "Failed to create the part's controls", with the following stack trace: java.lang.NullPointerException at org.jboss.tools.jst.jsp.HTMLTextViewerConfiguration.getHyperlinkDetectors(HTMLTextViewerConfiguration.java:134) at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.configure(StructuredTextViewer.java:295) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3416) at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447) at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1514) at org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor.createPartControl(JSPTextEditor.java:349) at org.jboss.tools.vpe.editor.VpeEditorPart.createPartControl(VpeEditorPart.java:527) at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart.addPage(JSPMultiPageEditorPart.java:93) at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPagesForVPE(JSPMultiPageEditor.java:543) at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPages(JSPMultiPageEditor.java:483) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:358) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:129) at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:95) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:300) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:837) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111) Re-enable on-demand hyperlinking close and re-open file, JBoss tools editors now function again.

      JBoss Tools text/xml/html editors will fail to initialize if the user has disabled on-demand hyperlinking in the Eclipse text editor preferences. The user is shown an error message ("Failed to create the part's controls") that when examined in detail is due to a NPE generated when trying to get a collection of hyperlink detectors.

            vrubezhny Victor Rubezhny (Inactive)
            danfleet Dan Fleet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: