myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danijel Domazet <danijel.doma...@mainconcept.de>
Subject Tomahawk "tree2" - null pointer error
Date Thu, 29 Mar 2012 13:19:28 GMT
Hi MyFaces,
I've added a JSF Tomahawk t:tree2 UI component, and the page renders fine. However, as soon
as I do anything on the page: click on a button that sends submit(), or press on a button
with action parameter set, error is reported:

    java.lang.NullPointerException

    viewId=/job.xhtml
    location=trunk\tce\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\EWC\job.xhtml
    phaseId=RESTORE_VIEW(1)

    Caused by:
    java.lang.NullPointerException
    at org.apache.myfaces.custom.tree2.UITreeData.getDataModel(UITreeData.java:701)


Here is a stack trace:

    java.lang.NullPointerException
            at org.apache.myfaces.custom.tree2.UITreeData.getDataModel(UITreeData.java:701)
            at org.apache.myfaces.custom.tree2.UITreeData.setNodeId(UITreeData.java:387)
            at org.apache.myfaces.custom.tree2.AbstractHtmlTree.setNodeId(AbstractHtmlTree.java:101)
            at org.apache.myfaces.custom.tree2.UITreeData.visitTree(UITreeData.java:541)
            at javax.faces.component.UIComponent.visitTree(UIComponent.java:958)
            at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1073)
            at javax.faces.component.UIData.visitTree(UIData.java:2169)
            at javax.faces.component.UIForm.visitTree(UIForm.java:354)
            at javax.faces.component.UIComponent.visitTree(UIComponent.java:958)
            at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1073)
            at org.apache.myfaces.lifecycle.DefaultRestoreViewSupport.processComponentBinding(DefaultRestoreViewSupport.java:105)
            at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:146)
            at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
            at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:112)
            at com.mainconcept.rews.webclient.controller.MyFacesServletWrapper.service(MyFacesServletWrapper.java:44)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
            at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
            at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)

The location where exception is thrown is at

    MyFacesServlet::service(ServletRequest request, ServletResponse response);

...so it's at the beggining, the backing bean doesn't even get instantiated again.


The code in the xhtml page:

    <h:dataTable value="#{JobMgmtBean.presetsTreesList}" var="presetsTree">
                                                                      <h:column>

                                                                                  <t:tree2
                                                                                         
       value             =   "#{presetsTree}"
                                                                                         
       var               =   "presetsTreeNode"
                                                                                         
       varNodeToggler    =   "t"
                                                                                         
       showLines         =   "true"
                                                                                         
       showRootNode      =   "true"
                                                                                         
       showNav           =   "true"
                                                                                         
       clientSideToggle  =   "true"
                                                                                         
       preserveToggle    =   "true">

                                                                                         
     <f:facet name="facetPresetTree">
                                                                                         
                <h:panelGroup>
                                                                                         
                            <h:selectBooleanCheckbox
                                                                                         
                                                   value               = "#{JobMgmtBean.idsT2[presetsTreeNode.identifier]}"
                                                                                         
                                                   title               = "#{presetsTreeNode.identifier}"
                                                                                         
                                                   valueChangeListener ="#{JobMgmtBean.setPresetsTreeNodeState}"
                                                                                         
                                                        />
                                                                                         
                            <h:outputText value="#{presetsTreeNode.description}" styleClass="text"/>
                                                                                         
                </h:panelGroup>
                                                                                         
     </f:facet>
                                                                                       </t:tree2>
                                                                                       </h:column>
                                                                                       </h:dataTable>

Related bean members are:

    protected List<TreeNodeChecked> presetsTreesList;
    private HashMap<String, Boolean> idsT2;


This exception is thrown immediatey, even before any breakpoint in the backing bean JobMgmtBean
gets hit. So I can't debug.

What could be the reason??




Danijel Domazet
Software Developer

www.MainConcept.com
Rovi. Join the Entertainment.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message