[jboss-user] [JBoss Tools] - ViewExpiredException with fileupload

Aurélio Gimenes do-not-reply at jboss.com
Mon Apr 16 09:00:58 EDT 2012


Aurélio Gimenes [https://community.jboss.org/people/aurelios] created the discussion

"ViewExpiredException with fileupload"

To view the discussion, visit: https://community.jboss.org/message/730272#730272

--------------------------------------------------------------
Hi, i´m using 

JSF 1.2
RichFaces 3.3.0
JBoss Seam 2.2.0

after sending a large file that takes on average five minutes, when I run a submit I get this exception and I lose the reference file. how can I solve this problem?


*WEB.XML*
<context-param>
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>blueSky</param-value>
</context-param>
<filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
</filter>

<filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>FacesServlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
</filter-mapping>

<security-constraint>
    <web-resource-collection>
        <url-pattern>/f/a4j/*</url-pattern>
    </web-resource-collection>
</security-constraint>
<context-param>
   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
   <param-value>server</param-value> <!-- I tried both client and server-->
</context-param>
<filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    <init-param>
        <param-name>createTempFiles</param-name>
        <param-value>true</param-value>
</init-param>
<init-param>
        <param-name>maxRequestSize</param-name>
        <param-value>1000000000</param-value>
</init-param>
</filter>

*JSP*
<rich:fileUpload
    fileUploadListener="#{inscricaoAction.adicionarArquivo}"                            
    onclear="document.getElementById('corpo:formulario:btClearUploadedData').click();"                            
    id="upload" cleanButtonClassDisabled="display:none;"
    maxFilesQuantity="#{inscricaoAction.uploadsAvailableA}"
    immediateUpload="true" 

    acceptedTypes="" style="width: 350px;"
    allowFlash="true" noDuplicate="true" listHeight="100px"
    uploadControlLabel="Importar" clearControlLabel="Limpar" 
    addControlLabel="Selecionar Arquivos" clearAllControlLabel="Limpar Todos"
    cancelEntryControlLabel="Cancelar" stopControlLabel="Parar"                            
    doneLabel="Arquivo importado com sucesso"
    transferErrorLabel="Erro ao importar o arquivo"
    stopEntryControlLabel="parar" 
    progressLabel="Importando o Arquivo...">
    <f:facet name="label">
        <ht:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}" />    
    </f:facet>
    <a4j:support event="onuploadcomplete"  reRender="info,upload" />
</rich:fileUpload>

*ERROR:*
2012-04-11 16:10:51,435 [http-80-3] ERROR org.ajax4jsf.webapp.BaseXMLFilter - Exception in the filter chain
javax.servlet.ServletException: viewId:/t/inscricaoman - null MessageFactory
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:367)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
Caused by: javax.faces.application.ViewExpiredException: viewId:/t/inscricaoman - null MessageFactory
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    ... 20 more
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/730272#730272]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120416/f9815e98/attachment-0001.html 


More information about the jboss-user mailing list