[JBoss Tools] - ViewExpiredException with fileupload
by Aurélio Gimenes
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&con...]
13 years, 12 months
[jBPM] - TaskSummary.getName() returns null while using persistence
by Devinder Singh
Devinder Singh [https://community.jboss.org/people/devinderpal] created the discussion
"TaskSummary.getName() returns null while using persistence"
To view the discussion, visit: https://community.jboss.org/message/730629#730629
--------------------------------------------------------------
Hi,
I'm using persistence for using jBPM 5.2 with Jboss 7. Server startups properly and jBPM also loads up properly. I'm able to start the processes using jBPM APIs. In my BPMN file, I have usertasks defined and once process is started, process stops at userTask for taking in feedback of the user, which is the expected flow.
But now I want to show to user various human tasks that he's the owner of and also wants to display the name of the task that's currently assigned to him. So I'm getting TaskSummary by using below code:
BlockingTaskSummaryResponseHandler responseHandler = new BlockingTaskSummaryResponseHandler();
taskClient.getTasksAssignedAsPotentialOwner(userId, "en-uk", responseHandler);
List<TaskSummary> taskSummaries = responseHandler.getResults();
It successfully returns the TaskSummary List but when I do getName or getDescription on TaskSummary instance, it returns null.
Then I looked at named queries defined in Task-orm.xml. Seems like it's getting name and description from I18NText table, which is empty in my database. That looks like a problem.
Can someone please help with this? How can I make TaskSummary.getName() return right values.
I''m using below code to instantiate StatefulKnowledgeSession:
KnowledgeBase kbase = readKnowledgeBase(); // read knowledgebase from a private method
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set( EnvironmentName.TRANSACTION_MANAGER,
/* setting my transaction manager*/ );
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Integer ksessionId = retrieveKnowledgeSessionId(); //retrieves knowledge session id from DB
if (ksessionId == null)
{
// create a new knowledge session that uses JPA to store the runtime state
ksession =
JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
}
else
{
ksession =
JPAKnowledgeService.loadStatefulKnowledgeSession(ksessionId, kbase, null, env);
}
jbpmLogger = new JPAWorkingMemoryDbLogger(ksession);
CommandBasedWSHumanTaskHandler humanTaskHandler =
new CommandBasedWSHumanTaskHandler(ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/730629#730629]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 12 months