Community
Participate
Working Groups
Found by Neil Hauge. Results in logged NPE below. This task should only run against JSF view files (JSPs and later on XHTMLs) and only when a design time component tree is requested. java.lang.NullPointerException at org.eclipse.jst.jsf.designtime.internal.view.XMLComponentTreeConstructionStrategy.createComponentTree(XMLComponentTreeConstructionStrategy.java:46) at org.eclipse.jst.jsf.designtime.internal.view.DefaultDTUIViewRoot$RefreshTreeJob.run(DefaultDTUIViewRoot.java:138) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I came across this error when I was editting in the WSDL editor and the JSF Component Tree view was up. Is this the same issue or should I open another bug? !ENTRY org.eclipse.ui.workbench 4 2 2008-01-25 16:38:12.421 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.NullPointerException at org.eclipse.jst.jsf.designtime.internal.view.AbstractDTViewHandler.getWebContentPath(AbstractDTViewHandler.java:77) at org.eclipse.jst.jsf.designtime.internal.view.AbstractDTViewHandler.getViewId(AbstractDTViewHandler.java:63) at org.eclipse.jst.jsf.designtime.context.DTFacesContext.getViewRoot(DTFacesContext.java:102) at org.eclipse.jst.jsf.ui.internal.component.DTJSFViewModel.init(DTJSFViewModel.java:72) at org.eclipse.jst.jsf.ui.internal.component.ComponentTreeView$ComponentPage.createControl(ComponentTreeView.java:235) at org.eclipse.jst.jsf.ui.internal.component.ComponentTreeView.doCreatePage(ComponentTreeView.java:164) at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:399) at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:741) at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
Interesting. The issue is caused by the same root cause: the view is updating it's page for a document it shouldn't (it should only react if a JSF source file editor is activated) and it is not ensure the project has a JSF facet when it does so. Does the project you found this in have a dynamic web facet? Does the problem occur if the Component Tree View is not open? (In reply to comment #1) > I came across this error when I was editting in the WSDL editor and the JSF > Component Tree view was up. Is this the same issue or should I open another > bug?
(In reply to comment #2) > Does the project you found this in have a dynamic web facet? Does the problem > occur if the Component Tree View is not open? No, it was just a general/simple project. And no, I haven't seen it happen after I closed the view.
A little more info on this. When I created my test JPA Project, I noticed that the JSF Component Tree view was open. I didn't have a JSF facet in the project as it was strictly a JPA project. When I close this view the errors do stop occurring. I just created a new workspace and I see that the JSF Component Tree view is visible in the default Java perspective (prior to any project creation). So this is part of what makes the bug visible to someone who is not using the JSF functionality.
Neil, thanks for your diligence in characterizing the bug. I hadn't realized that I had included a perspective extension with the view (it was generated by the wizard when I did my original prototype). The view was never meant to be seen unless a user or adopter enables it. Per https://bugs.eclipse.org/bugs/show_bug.cgi?id=216708, I have removed the perspective extension, so the view should stop appearing in new workspaces. This change will appear in this week's I-build. I have also added new logic to address the resulting problem of the update job running when it's not supposed to. This should be in either this or next week's I-build. (In reply to comment #4) > A little more info on this. When I created my test JPA Project, I noticed that > the JSF Component Tree view was open. I didn't have a JSF facet in the project > as it was strictly a JPA project. When I close this view the errors do stop > occurring. > I just created a new workspace and I see that the JSF Component Tree view is > visible in the default Java perspective (prior to any project creation). So > this is part of what makes the bug visible to someone who is not using the JSF > functionality.
Fixed.
Verfied in M6.