<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    ViewExpiredException with fileupload
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/aurelios">AurĂ©lio Gimenes</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/730272#730272">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi, i&#180;m using </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>JSF 1.2</p><p>RichFaces 3.3.0</p><p>JBoss Seam 2.2.0</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span id="result_box" lang="en"><span class="hps">after sending</span> <span class="hps">a</span> <span class="hps">large file that</span> <span class="hps">takes</span> <span class="hps">on average</span> <span class="hps">five minutes,</span> <span class="hps">when I run</span> <span class="hps">a</span> <span class="hps">submit</span> <span class="hps">I get</span> <span class="hps">this exception</span> <span class="hps">and I lose</span> <span class="hps">the reference</span> <span class="hps">file</span>. <span class="hps">how</span> <span class="hps">can I solve this</span> <span class="hps">problem?</span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>WEB.XML</strong></p><p>&lt;context-param&gt;</p><p>&#160;&#160;&#160; &lt;param-name&gt;org.richfaces.SKIN&lt;/param-name&gt;</p><p>&#160;&#160;&#160; &lt;param-value&gt;blueSky&lt;/param-value&gt;</p><p>&lt;/context-param&gt;</p><p>&lt;filter&gt;</p><p>&#160;&#160;&#160; &lt;display-name&gt;RichFaces Filter&lt;/display-name&gt;</p><p>&#160;&#160;&#160; &lt;filter-name&gt;richfaces&lt;/filter-name&gt;</p><p>&#160;&#160;&#160; &lt;filter-class&gt;org.ajax4jsf.Filter&lt;/filter-class&gt;</p><p>&lt;/filter&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;filter-mapping&gt;</p><p>&#160;&#160;&#160; &lt;filter-name&gt;richfaces&lt;/filter-name&gt;</p><p>&#160;&#160;&#160; &lt;servlet-name&gt;FacesServlet&lt;/servlet-name&gt;</p><p>&#160;&#160;&#160; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;</p><p>&#160;&#160;&#160; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;</p><p>&#160;&#160;&#160; &lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;</p><p>&lt;/filter-mapping&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;security-constraint&gt;</p><p>&#160;&#160;&#160; &lt;web-resource-collection&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;url-pattern&gt;/f/a4j/*&lt;/url-pattern&gt;</p><p>&#160;&#160;&#160; &lt;/web-resource-collection&gt;</p><p>&lt;/security-constraint&gt;</p><p>&lt;context-param&gt;</p><p>&#160;&#160; &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;</p><p>&#160;&#160; &lt;param-value&gt;server&lt;/param-value&gt; &lt;!-- <span class="short_text" id="result_box" lang="en"><span class="hps">I tried</span> <span class="hps">both</span> <span class="hps">client</span> <span class="hps">and server--&gt;</span></span></p><p>&lt;/context-param&gt;</p><p>&lt;filter&gt;</p><p>&#160;&#160;&#160; &lt;display-name&gt;RichFaces Filter&lt;/display-name&gt;</p><p>&#160;&#160;&#160; &lt;filter-name&gt;richfaces&lt;/filter-name&gt;</p><p>&#160;&#160;&#160; &lt;filter-class&gt;org.ajax4jsf.Filter&lt;/filter-class&gt;</p><p>&#160;&#160;&#160; &lt;init-param&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param-name&gt;createTempFiles&lt;/param-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param-value&gt;true&lt;/param-value&gt;</p><p>&lt;/init-param&gt;</p><p>&lt;init-param&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param-name&gt;maxRequestSize&lt;/param-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;param-value&gt;1000000000&lt;/param-value&gt;</p><p>&lt;/init-param&gt;</p><p>&lt;/filter&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>JSP</strong></p><p>&lt;rich:fileUpload</p><p>&#160;&#160;&#160; fileUploadListener="#{inscricaoAction.adicionarArquivo}"&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160; onclear="document.getElementById('corpo:formulario:btClearUploadedData').click();"&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160; id="upload" cleanButtonClassDisabled="display:none;"</p><p>&#160;&#160;&#160; maxFilesQuantity="#{inscricaoAction.uploadsAvailableA}"</p><p>&#160;&#160;&#160; immediateUpload="true" </p><p>&#160;&#160;&#160; </p><p>&#160;&#160;&#160; acceptedTypes="" style="width: 350px;"</p><p>&#160;&#160;&#160; allowFlash="true" noDuplicate="true" listHeight="100px"</p><p>&#160;&#160;&#160; uploadControlLabel="Importar" clearControlLabel="Limpar" </p><p>&#160;&#160;&#160; addControlLabel="Selecionar Arquivos" clearAllControlLabel="Limpar Todos"</p><p>&#160;&#160;&#160; cancelEntryControlLabel="Cancelar" stopControlLabel="Parar"&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160; doneLabel="Arquivo importado com sucesso"</p><p>&#160;&#160;&#160; transferErrorLabel="Erro ao importar o arquivo"</p><p>&#160;&#160;&#160; stopEntryControlLabel="parar" </p><p>&#160;&#160;&#160; progressLabel="Importando o Arquivo..."&gt;</p><p>&#160;&#160;&#160; &lt;f:facet name="label"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ht:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}" /&gt;&#160;&#160;&#160; </p><p>&#160;&#160;&#160; &lt;/f:facet&gt;</p><p>&#160;&#160;&#160; &lt;a4j:support event="onuploadcomplete"&#160; reRender="info,upload" /&gt;</p><p>&lt;/rich:fileUpload&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>ERROR:</strong></p><p>2012-04-11 16:10:51,435 [http-80-3] ERROR org.ajax4jsf.webapp.BaseXMLFilter - Exception in the filter chain</p><p>javax.servlet.ServletException: viewId:/t/inscricaoman - null MessageFactory</p><p>&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p>&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)</p><p>&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)</p><p>&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:367)</p><p>&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)</p><p>&#160;&#160;&#160; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)</p><p>&#160;&#160;&#160; at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20)</p><p>&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</p><p>&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</p><p>&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)</p><p>&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)</p><p>&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)</p><p>&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)</p><p>&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)</p><p>Caused by: javax.faces.application.ViewExpiredException: viewId:/t/inscricaoman - null MessageFactory</p><p>&#160;&#160;&#160; at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)</p><p>&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)</p><p>&#160;&#160;&#160; at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)</p><p>&#160;&#160;&#160; at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)</p><p>&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)</p><p>&#160;&#160;&#160; ... 20 more</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/730272#730272">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>