I am using PF5.0 and JSF2.2.7 in my web application using primefaces Wizard Component for file uploading like this
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
template="./../templates/loggedinTemplate.xhtml">
<ui:define name="title">Group Distribution </ui:define>
<ui:define name="moduleDetails">
<h:form enctype="application/x-www-form-urlencoded; charset=UTF-8" >
<p:growl id="growl" sticky="true" showDetail="true" />
<p:overlayPanel for="helpButton" hideEffect="fade"
style="float: right; width: 50%">
<p:panel header="3 Step Process" style="width:97%;">
<p:spacer height="40"></p:spacer>
<h:outputText value="Step 1" styleClass="linkButton"
style="background-color: #0165b0 !important" />
<h:outputText style="font-size:12px;" value=" Upload XSL File" />
<br />
<p:spacer height="40"></p:spacer>
<h:outputText value="Step 2" styleClass="linkButton"
style="background-color: #0165b0 !important" />
<h:outputText style="font-size:12px;"
value="Check Length and make changes" />
<br />
<p:spacer height="40"></p:spacer>
<h:outputText value="Step 3" styleClass="linkButton"
style="background-color: #0165b0 !important" />
<h:outputText style="font-size:12px;" value="Save Tweets" />
</p:panel>
</p:overlayPanel>
<f:facet name="actions">
<p:commandLink value="Help" id="helpButton" type="button"
styleClass="ui-panel-titlebar-icon" />
</f:facet>
<p:spacer height="20"></p:spacer>
<p:wizard widgetVar="fileUploadWiz" nextLabel="Next"
flowListener="#{tweetDistributionManagedBean.onFlowProcess}"
showStepStatus="true">>
<p:tab id="upload" title="Upload File" styleClass="main">
<p:panel style="width:100%" styleClass="panelnoborder">
<f:facet name="header">
<p:outputLabel styleClass="mainTitlebar"
value="Step 1. Upload XSL File"></p:outputLabel>
</f:facet>
<p:spacer height="10" width="100%"></p:spacer>
<h:outputText
value="If transactions are in an Excel spreadsheet, then first save the sheet as CSV file and then upload. Download " />
<p:commandLink id="downloadLink" value="Sample Xls File"
ajax="false" style="font-size:12px;color:#F62217 !important">
<p:fileDownload
value="#{tweetDistributionManagedBean.downloadFile}" />
</p:commandLink>
<p:spacer height="20" width="100%"></p:spacer>
<p:panelGrid align="centre" style="width:100%" cellspacing="5">
<p:row>
<p:column>
<p:fileUpload
style="font-size:12px;background-color: #FC8C02 !important;align:centre;"
fileUploadListener="#{tweetDistributionManagedBean.handleFileUpload}"
label="Choose File" showButtons="false"
requiredMessage="Please select the file" required="true"
mode="advanced" multiple="true" update="#form" auto="true"
sizeLimit="1048576"
allowTypes="/(\.|\/)(doc|docx|xls|xlsx|pdf)$/" />
</p:column>
</p:row>
<p:row>
<p:column>
<h:outputText
value="#{tweetDistributionManagedBean.fileUploadMessage}"></h:outputText>
</p:column>
</p:row>
</p:panelGrid>
</p:panel>
</p:tab>
<p:tab title="Edit Tweets" styleClass="main">
<p:panel>
<f:facet name="header">
<p:outputLabel styleClass="mainTitlebar"
value="Step 2. Edit Tweets"></p:outputLabel>
</f:facet>
<h:panelGrid columns="1" cellpadding="10" cellspacing="5"
style="width:700px;" columnClasses="label, value">
<p:column>
<p:dataTable
value="#{tweetDistributionManagedBean.excellist}" var="o"
resizableColumns="true" styleClass="ui-datatable-hor-scroll"
scrollWidth="100%" tableStyle="width:auto" rowKey="#{o}">
<p:column headerText="Tweet Id">
<h:outputText value="#{o.distObject.gdId}" />
</p:column>
<p:column headerText="Tweet">
<h:inputText value="#{o.distObject.gdTweet}" size="20" />
</p:column>
</p:dataTable>
</p:column>
<p:spacer></p:spacer>
<p:commandButton value="Submit"
actionListener="#{groupWizardBean.saveGroup}" update="growl" />
</h:panelGrid>
</p:panel>
</p:tab>
</p:wizard>
</h:form>
</ui:define>
</ui:composition>
But after uploading file when i am clicking on Next button it is throwing
INFO: javax.faces.FacesException: javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 javax.faces.FacesException:
javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 at
org.primefaces.component.fileupload.NativeFileUploadDecoder.decode(NativeFileUploadDecoder.java:44)
at
org.primefaces.component.fileupload.FileUploadRenderer.decode(FileUploadRenderer.java:44)
at
javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
at javax.faces.component.UIInput.decode(UIInput.java:771) at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1225)
at javax.faces.component.UIInput.processDecodes(UIInput.java:676) at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
org.primefaces.component.panel.Panel.processDecodes(Panel.java:280)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
org.primefaces.component.wizard.Wizard.processDecodes(Wizard.java:179)
at
com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:573)
at
com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at javax.faces.component.UIForm.visitTree(UIForm.java:371) at
javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at
javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at
com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)
at
com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)
at
javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
at
org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at
javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)
at
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
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:225)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
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:1001)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722) Caused by:
javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 at
org.apache.catalina.connector.Request.parseParts(Request.java:2772)
at org.apache.catalina.connector.Request.getParts(Request.java:2631)
at org.apache.catalina.connector.Request.getPart(Request.java:2796)
at
org.apache.catalina.connector.RequestFacade.getPart(RequestFacade.java:1082)
at
org.primefaces.component.fileupload.NativeFileUploadDecoder.decodeAdvanced(NativeFileUploadDecoder.java:60)
at
org.primefaces.component.fileupload.NativeFileUploadDecoder.decode(NativeFileUploadDecoder.java:37)
... 53 more Caused by:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 at
org.apache.tomcat.util.http.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:774)
at
org.apache.tomcat.util.http.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:284)
at
org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:304)
at
org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:129)
at
org.apache.catalina.connector.Request.parseParts(Request.java:2713)
... 58 more
Aug 05, 2014 1:48:27 PM
com.sun.faces.lifecycle.ApplyRequestValuesPhase execute WARNING:
javax.faces.FacesException: javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 javax.faces.FacesException: javax.faces.FacesException:
javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 at
com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:273)
at
javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
at
org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at
javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)
at
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
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:225)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
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:1001)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722) Caused by:
javax.faces.FacesException: javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 at
org.primefaces.component.fileupload.NativeFileUploadDecoder.decode(NativeFileUploadDecoder.java:44)
at
org.primefaces.component.fileupload.FileUploadRenderer.decode(FileUploadRenderer.java:44)
at
javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
at javax.faces.component.UIInput.decode(UIInput.java:771) at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1225)
at javax.faces.component.UIInput.processDecodes(UIInput.java:676) at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
org.primefaces.component.panel.Panel.processDecodes(Panel.java:280)
at
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
at
org.primefaces.component.wizard.Wizard.processDecodes(Wizard.java:179)
at
com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:573)
at
com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at javax.faces.component.UIForm.visitTree(UIForm.java:371) at
javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at
javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at
com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)
at
com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)
... 32 more Caused by: javax.servlet.ServletException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or multipart/mixed
stream, content type header is application/x-www-form-urlencoded;
charset=UTF-8 at
org.apache.catalina.connector.Request.parseParts(Request.java:2772)
at org.apache.catalina.connector.Request.getParts(Request.java:2631)
at org.apache.catalina.connector.Request.getPart(Request.java:2796)
at
org.apache.catalina.connector.RequestFacade.getPart(RequestFacade.java:1082)
at
org.primefaces.component.fileupload.NativeFileUploadDecoder.decodeAdvanced(NativeFileUploadDecoder.java:60)
at
Can any one tell me what changes and configuration i am missing ?
Related
I am trying to make a data search on a table. I have tried to follow the example in the showcase primefaces for the DataTable filter. However, strangely when I enter the value that I want to find, the contents of the table will immediately empty. For example I want to find the username 'A', then when I type 'A' the contents of the table will disappear.
Here is my table:
<h:form id="dataTable">
<p:dataTable var="users" rows="10" value="#{listUserAccountBean.users}"
style="width: 100%; float: left; margin-top:10px;" paginator="true"
pageLinks="10" rowsPerPageTemplate="5,10,15"
widgetVar="widgetWorkOrder" rowIndexVar="rowIndex"
paginatorPosition="bottom" emptyMessage="No record found"
styleClass="no-dtbl-header" id="listDataUser" filteredValue="#{listUserAccountBean.filteredUsers}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
<f:facet name="header">
<p:outputPanel>
<h:outputText value="Search all fields:" />
<p:inputText id="globalFilter" onkeyup="PF('widgetWorkOrder').filter()" placeholder="Enter keyword"/>
</p:outputPanel>
</f:facet>
<p:columnGroup type="header">
<p:column headerText="Username" />
<p:column headerText="Password" />
<p:column headerText="Action" colspan="2"/>
</p:columnGroup>
<p:column filterBy="#{users.username}" footerText="test1" filterMatchMode="test1">
<h:outputText value="#{users.username}" />
</p:column>
<p:column filterBy="#{users.password}" footerText="test2" filterMatchMode="test2">
<h:outputText value="#{users.password}" />
</p:column>
<p:column style="text-align: center">
<p:commandLink action="#{listUserAccountBean.goToEditUserAccount(users)}">
<p:graphicImage name="edit.png" library="images" width="25px"
height="25px" />
</p:commandLink>
</p:column>
<p:column style="text-align: center">
<p:commandLink actionListener="#{listUserAccountBean.prepareDelete(users)}"
oncomplete="PF('dlg-delete').show();">
<p:graphicImage name="delete-admin.png" library="images"
width="25px" height="25px" />
</p:commandLink>
</p:column>
</p:dataTable>
</h:form>
Here is my log cat:
14:37:38,073 INFO [javax.enterprise.resource.webcontainer.jsf.context] (http-localhost-127.0.0.1-8081-2) java.lang.ClassCastException: org.primefaces.component.column.Column cannot be cast to org.primefaces.component.row.Row: java.lang.ClassCastException: org.primefaces.component.column.Column cannot be cast to org.primefaces.component.row.Row
at org.primefaces.component.datatable.feature.FilterFeature.populateFilterMetaDataInColumnGroup(FilterFeature.java:283) [primefaces-5.3.jar:5.3]
at org.primefaces.component.datatable.feature.FilterFeature.populateFilterMetaData(FilterFeature.java:257) [primefaces-5.3.jar:5.3]
at org.primefaces.component.datatable.feature.FilterFeature.decode(FilterFeature.java:90) [primefaces-5.3.jar:5.3]
at org.primefaces.component.datatable.DataTable.processValidators(DataTable.java:716) [primefaces-5.3.jar:5.3]
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:508) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) [jsf-impl-2.1.7-jbossorg-2.jar:]
at org.primefaces.component.api.UIData.visitTree(UIData.java:822) [primefaces-5.3.jar:5.3]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:376) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:252) [jsf-impl-2.1.7-jbossorg-2.jar:]
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60) [primefaces-5.3.jar:5.3]
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1170) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:67) [log4j-web-2.0.2.jar:2.0.2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
14:37:38,020 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (http-localhost-127.0.0.1-8081-2) java.lang.NullPointerException
Did I miss something?
Add a p:row as child of p:columnGroup wrapping your p:column.
<p:columnGroup type="header">
<p:row>
<p:column headerText="Username" />
<p:column headerText="Password" />
<p:column headerText="Action" colspan="2"/>
</p:row>
</p:columnGroup>
It seems PrimeFaces code searches the first child of columnGroup and tries to cast it to column.
I have datatable with checkbox selection option and I want to track check,uncheck and toggle select events. My code is :
<p:dataTable id="faDetail" value="#{assetSWOMB.faDetailList}"
lazy="true" rowIndexVar="rowsn" var="fad" rowKey="fad.id"
selection="#{assetSWOMB.selectedList}" scrollable="true"
scrollHeight="115">
<p:ajax event="rowSelectCheckbox" ajax="true"
immediate="true" listener="#{assetSWOMB.onCheck()}"
update=":mainForm:countUser" process="#this" />
<p:ajax event="rowUnselectCheckbox" ajax="true"
immediate="true" listener="#{assetSWOMB.onCheck()}"
update=":mainForm:countUser" process="#this" />
<f:facet name="header">
Asset Detail List
</f:facet>
<p:column style="width:16px;text-align:center"
selectionMode="multiple" />
<p:column headerText="#">
<h:outputText value="#{rowsn+1}" />
</p:column>
<p:column headerText="Given Name">
<h:outputText value="#{fad.assetGivenName}" />
</p:column>
<p:column headerText="Brand Name">
<h:outputText value="#{fad.brandDescription}" />
</p:column>
</p:dataTable>
Function in Managed Bean is :
public void onCheck(){
userCount = selectedList.size();
}
While selecting a checkbox (check or uncheck), it always displays following error :
com.sun.faces.context.PartialViewContextImpl processPartial
INFO: javax.faces.FacesException: DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled or you need to define rowKey attribute
javax.faces.FacesException: DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled or you need to define rowKey attribute
at org.primefaces.component.datatable.DataTable.getRowData(DataTable.java:950)
at org.primefaces.component.datatable.feature.SelectionFeature.decodeMultipleSelection(SelectionFeature.java:71)
at org.primefaces.component.datatable.feature.SelectionFeature.decode(SelectionFeature.java:40)
at org.primefaces.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:57)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
at org.primefaces.component.api.UIData.processDecodes(UIData.java:228)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:506)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UIData.visitTree(UIData.java:639)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIForm.visitTree(UIForm.java:344)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1601)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:376)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:252)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.magnus.filter.LoginCheckFilter.doFilter(LoginCheckFilter.java:129)
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:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
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:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
But I have defined rowKey.
How to make it work ??
Try with this rowKey="#{fad.id}"
I am getting the following error when I select a row in the lazy datatable :
javax.faces.FacesException: Method not found: com.gestion.projet.web.jsf.ProjetComponentImpl#f632823.onRowSelect(org.primefaces.event.SelectEvent)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:85)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
and then the code associated with the following bean method:
#Scope("session")
#Component("ProjetComponent")
public class ProjetComponentImpl implements ProjetComponent {
public void onRowSelect(SelectEvent event) {
FacesMessage msg = new FacesMessage("Projet Selected", ((Projet) event.getObject()).getIdprojet().toString());
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
and this the xhtml page:
<h:form id="form">
<p:dataTable var="current" value="#{ProjetComponent.lazyModel}"
paginator="true" rows="10"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15" selectionMode="single"
selection="#{ProjetComponent.projet}" id="projetTable" lazy="true">
<p:ajax event="rowSelect" listener="#{ProjetComponent.onRowSelect}"
update=":form:projetDetail" oncomplete="PF('projetDialog').show()" />
<p:column headerText="Id" sortBy="#{current.idprojet}" filterBy="#{current.idprojet}">
<h:outputText value="#{current.idprojet}" />
</p:column>
<p:column headerText="Nom" sortBy="#{current.nomprojet}"
filterBy="#{current.nomprojet}">
<h:outputText value="#{current.nomprojet}" />
</p:column>
</p:dataTable>
<p:dialog header="Projet Detail" widgetVar="projetDialog" modal="true"
showEffect="fade" hideEffect="fade" resizable="false">
<p:outputPanel id="projetDetail" style="text-align:center;">
<p:panelGrid columns="2"
rendered="#{not empty ProjetComponent.projet}"
columnClasses="label,value">
<f:facet name="header">
</f:facet>
<h:outputText value="Id:" />
<h:outputText value="#{ProjetComponent.projet.idprojet}" />
<h:outputText value="Nom:" />
<h:outputText value="#{ProjetComponent.projet.nomprojet}" />
</p:panelGrid>
</p:outputPanel>
</p:dialog>
</h:form>
this is a snaphshot of what i get when i select a row :
Seems you're interchanging Spring Annotations with JSF annotations - PrimeFaces is a JSF component library in use with a JSF Managed Bean - #SessionScope and #ManagedBean(name="projectBlah")
from the javax.faces.bean packages
I get the following exception when I click a button on a JSF/RichFaces page.
This problem only seems to happen on one server. Any ideas?
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at com.sun.faces.renderkit.html_basic.MenuRenderer.getCurrentSelectedValues(MenuRenderer.java:633)
at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:524)
at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:757)
at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:811)
at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:279)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
here's the page causing the problem:
<h:form id="clientCreatorForm" >
<h1><h:outputText value="Linguist Creator"/></h1>
<rich:messages styleClass="error_msg" showDetail="true" showSummary="true"/>
<h:panelGrid id="op" columns="2">
<rich:spacer height="20px" />
<h:outputText value="" />
<h:outputText value="Linguists:" />
<rich:comboBox value="#{linguistCreator.linguistCompanyName}">
<f:selectItems value="#{linguistCreator.companyItemsAvailable}" />
<a4j:support action="#{linguistCreator.l1RequiredInputTest}"
ajaxSingle="true"
event="onselect"
reRender="footerPanel" />
</rich:comboBox>
</h:panelGrid>
<rich:spacer height="20px" />
<h:panelGrid id="footerPanel" columns="1" >
<a4j:commandButton id="updatebutton" value="Add new Language(s) to selected linguist."
action="#{linguistCreator.retrieveLinguistObjects}"
disabled="#{linguistCreator.enterDisabledL1}"/>
<a4j:commandButton id="addButton" value="Add new linguist" action="linguist2" />
</h:panelGrid>
</h:form>
So i basicly have a tree inside a collapsible and is iterating with a ui:repeat or ice:panelSeries because they pretty much have the same structure
<ui:repeat value="#{navigationBean.navigationPanels}" var="panel" >
<ice:panelCollapsible immediate="true" expanded="#{panel.expanded}" >
<f:facet name="header">
<ice:panelGroup>
<ice:outputText value="#{panel.title}" />
</ice:panelGroup>
</f:facet>
<ice:panelGroup styleClass="treeContainer">
<ice:tree id="tree" value="#{panel.treeModel}" var="item"
hideRootNode="true" hideNavigation="true"
imageDir="#{facesContext.externalContext.requestContextPath}/xmlhttp/css/xp/css-images/">
<ice:treeNode>
<f:facet name="icon">
<ice:panelGroup style="display: inline">
<h:graphicImage
value="#{userPreferences.imageDirectory}/#{item.userObject.icon}" />
</ice:panelGroup>
</f:facet>
<f:facet name="content">
<ice:panelGroup style="display: inline">
<ice:outputLink value="#{item.userObject.url}">
<ice:outputText styleClass="treeNode" value="#{item.userObject.text}" />
</ice:outputLink>
</ice:panelGroup>
</f:facet>
</ice:treeNode>
</ice:tree>
</ice:panelGroup>
</ice:panelCollapsible>
</ui:repeat>
The problem is that when i expand or collapse the panel gives me an awful error here is the stack:
java.lang.NullPointerException
at com.icesoft.faces.component.tree.Tree.visitRows(Tree.java:1447)
at com.icesoft.faces.component.tree.Tree.visitTree(Tree.java:1402)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
at com.sun.faces.facelets.component.UIRepeat.visitTree(UIRepeat.java:606)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
at javax.faces.component.UIForm.visitTree(UIForm.java:331)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:258)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
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)
Any idea why it could be behaving like this??
According to the source, #{panel.treeModel} evaluates to null.
Try <ice:tree rendered="#{panel.treeModel != null} ..., and see what happens.
It could be that the the problem does not occur at rendering. It could occur while building the server side component tree. On such cases you have to make sure that the xml tag <ice:tree../> is not parsed at all.
So try:
<c:if test="#{not empty panel.treeModel}"> <ice:tree ../> </c:if>
This is not working in all cases. So give it a try :-)