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

NPE in faces-config.xml editor

XMLWordPrintable

      1. Create JSF 2.2 KickStart project
      2. Open faces-config.xml
      3. Replace the content by the following code:

      <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
       
           <render-kit>
              <renderer>
                  <component-family>javax.faces.Output</component-family>
                  <renderer-type>javax.faces.Text</renderer-type>
                  <renderer-class&gt;com.xxx.HtmlTextRenderer</renderer-class&gt;
              </renderer>
       
              <renderer>
                  <component-family>javax.faces.Input</component-family>
                  <renderer-type>javax.faces.Text</renderer-type><!-- this results in  'Value javax.faces.Text is not unique.', but its needed -->
                  <renderer-class&gt;com.xxx.InputTextRenderer</renderer-class&gt;
              </renderer>
      </render-kit>  	
      </faces-config>
      

      4. Save the file
      5. See eclipse log:

      java.lang.NullPointerException
      	at org.jboss.tools.jsf.ui.editor.model.impl.Page$LinkList.removeLink(Page.java:113)
      	at org.jboss.tools.jsf.ui.editor.model.impl.Page.remove(Page.java:235)
      	at org.jboss.tools.jsf.ui.editor.model.impl.Group.remove(Group.java:299)
      	at org.jboss.tools.jsf.ui.editor.model.impl.JSFModel$ProcessItemList.nodeRemoved(JSFModel.java:408)
      	at org.jboss.tools.jsf.ui.editor.model.impl.JSFModel.structureChanged(JSFModel.java:345)
      	at org.jboss.tools.common.model.util.XModelTreeListenerSWTSync$2.run(XModelTreeListenerSWTSync.java:53)
      	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
      	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
      	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4491)
      	at org.jboss.tools.common.model.util.XModelTreeListenerSWTSync.structureChanged(XModelTreeListenerSWTSync.java:47)
      	at org.jboss.tools.common.model.impl.XModelImpl$2.run(XModelImpl.java:526)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.jboss.tools.common.model.impl.XModelImpl.fireStructureChanged(XModelImpl.java:522)
      	at org.jboss.tools.common.model.impl.XModelObjectImpl.fireStructureChanged(XModelObjectImpl.java:450)
      	at org.jboss.tools.common.model.impl.XModelObjectImpl.removeChild(XModelObjectImpl.java:286)
      	at org.jboss.tools.common.model.impl.XModelObjectImpl.removeFromParent(XModelObjectImpl.java:292)
      	at org.jboss.tools.jsf.model.helpers.JSFProcessHelper.removeObsoleteGroups(JSFProcessHelper.java:135)
      	at org.jboss.tools.jsf.model.helpers.JSFProcessHelper.updateProcess0(JSFProcessHelper.java:98)
      	at org.jboss.tools.jsf.model.helpers.JSFProcessHelper.updateProcess(JSFProcessHelper.java:74)
      	at org.jboss.tools.jsf.model.FacesProcessImpl.updateProcess(FacesProcessImpl.java:63)
      	at org.jboss.tools.jsf.model.FacesProcessImpl.loadChildren(FacesProcessImpl.java:54)
      	at org.jboss.tools.common.model.impl.RegularObjectImpl.getChildren(RegularObjectImpl.java:61)
      	at org.jboss.tools.jst.web.model.helpers.autolayout.Items.initItems(Items.java:57)
      	at org.jboss.tools.jst.web.model.helpers.autolayout.Items.load(Items.java:49)
      	at org.jboss.tools.jst.web.model.helpers.autolayout.Items.setProcess(Items.java:45)
      	at org.jboss.tools.jst.web.model.helpers.autolayout.AutoLayout.setProcess(AutoLayout.java:34)
      	at org.jboss.tools.jsf.model.helpers.JSFProcessHelper.autolayout(JSFProcessHelper.java:303)
      	at org.jboss.tools.jsf.model.FacesProcessImpl.autolayout(FacesProcessImpl.java:47)
      	at org.jboss.tools.jsf.ui.editor.FacesConfigGuiEditor.updateGui(FacesConfigGuiEditor.java:86)
      	at org.jboss.tools.common.editor.AbstractSectionEditor.setObject(AbstractSectionEditor.java:96)
      	at org.jboss.tools.jsf.ui.editor.FacesConfigEditor.setNormalMode(FacesConfigEditor.java:106)
      	at org.jboss.tools.common.editor.ObjectMultiPageEditor.update0(ObjectMultiPageEditor.java:621)
      	at org.jboss.tools.common.editor.ObjectMultiPageEditor.structureChanged(ObjectMultiPageEditor.java:573)
      	at org.jboss.tools.common.model.util.XModelTreeListenerSWTSync$2.run(XModelTreeListenerSWTSync.java:53)
      	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
      	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
      	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4491)
      	at org.jboss.tools.common.model.util.XModelTreeListenerSWTSync.structureChanged(XModelTreeListenerSWTSync.java:47)
      	at org.jboss.tools.common.model.impl.XModelImpl$2.run(XModelImpl.java:526)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.jboss.tools.common.model.impl.XModelImpl.fireStructureChanged(XModelImpl.java:522)
      	at org.jboss.tools.common.model.impl.XModelObjectImpl.fireStructureChanged(XModelObjectImpl.java:450)
      	at org.jboss.tools.common.model.filesystems.impl.FolderImpl.fireStructureChanged(FolderImpl.java:836)
      	at org.jboss.tools.common.model.impl.XModelObjectImpl.addChild(XModelObjectImpl.java:274)
      	at org.jboss.tools.common.model.filesystems.impl.FolderImpl.createFileObject(FolderImpl.java:309)
      	at org.jboss.tools.common.model.filesystems.impl.FolderImpl.createFileObject(FolderImpl.java:277)
      	at org.jboss.tools.common.model.filesystems.impl.FolderImpl.reload(FolderImpl.java:674)
      	at org.jboss.tools.common.model.filesystems.impl.FolderImpl.saveChild(FolderImpl.java:948)
      	at org.jboss.tools.common.model.filesystems.impl.FolderImpl.saveChild(FolderImpl.java:929)
      	at org.jboss.tools.common.editor.ObjectMultiPageEditor.doSave(ObjectMultiPageEditor.java:374)
      	at org.jboss.tools.common.model.ui.editor.EditorPartWrapper.doSave(EditorPartWrapper.java:235)
      	at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:150)
      	at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:276)
      	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
      	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
      	at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:1818)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1815)
      	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:284)
      	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:263)
      	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:155)
      	at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3769)
      	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3782)
      	at org.jboss.tools.common.model.ui.texteditors.SaveAction2.run(XMLTextEditorComponent.java:465)
      	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
      	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
      	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
      	at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
      	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
      	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
      	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
      	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
      	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
      	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:285)
      	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:504)
      	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:555)
      	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:376)
      	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:322)
      	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:84)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1554)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1391)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1416)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1401)
      	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1428)
      	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:829)
      	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3236)
      	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:758)
      	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2096)
      	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5467)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4569)
      	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8742)
      	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1243)
      	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2288)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3361)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
      	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
      

              scabanovich Viacheslav Kabanovich (Inactive)
              alexeykazakov Alexey Kazakov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: