View Expired Exception

UI Components for JSF
vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

30 Nov 2011, 06:00

Hi ,

I am using WAS6.1 with PF3.0 RC1 snapshot and mojarra 2.1.3 . My application gives view expired exception for any operation on the page . The 1st screen displays properly but if i click any button or even refresh the page it give the same exception .
I am unable to figure out if i am missing something . Any suggestions are welcome .

Thanks in advance .

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

30 Nov 2011, 06:01

To add to it i get error 500 on screen and error log does have some entries regarding file upload filter .

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

30 Nov 2011, 21:03

[30/11/11 13:56:40:677 EST] 0000002a WebGroup A SRVE0169I: Loading Web Module: Trax.war.
[30/11/11 13:56:41:840 EST] 0000002a config I Initializing Mojarra 2.1.3 (FCS 20110908) for context 'Trax.war'
[30/11/11 13:56:45:018 EST] 0000002a application I JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
[30/11/11 13:56:45:393 EST] 0000002a config E Unable to process annotations for url, wsjar:file:/export/enterprise-docs/was/61/profiles/unitraxIAT1/unitraxIAT1Node1/installedApps/unitraxIAT1Cell/TraxEAR.ear/Trax.war/WEB-INF/lib/primefaces-3.0.RC1-SNAPSHOT.jar!/META-INF/faces-config.xml. Reason: java.lang.NullPointerException
[30/11/11 13:56:45:418 EST] 0000002a config E
java.lang.NullPointerException
at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:165)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:43)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:102)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69)

This is the error that comes when starting the application but it is able to start . IT breaks at runtime with view expired exception .

WAS 6.1 Mojarra 2.1.3 PF 3.0 RC1

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

01 Dec 2011, 05:50

Please copy/paste a few lines BEFORE/AFTER the ViewExpiredException.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

01 Dec 2011, 06:02

I googled an error msg in your log file and searched based on the behavior your reported here. :)

Click the URLs below, and read the answers/discussions in the order listed below. I think you may find your solution and explanation at these URLs.

http://stackoverflow.com/questions/7956 ... ed-session

http://stackoverflow.com/search?q=was6+ ... mit=search

BalusC (on blog site of JSF developer that is very generous in answering people's questions related to JSF, and has answered MANY questions for YEARS)
http://balusc.blogspot.com/2010/06/bene ... coped.html
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

01 Dec 2011, 17:57

Uncaught exception thrown in one of the service methods of the servlet: Faces Servlet. Exception thrown : javax.servlet.ServletException: viewId:/ui/login.jsf - View /ui/login.jsf could not be restored.
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
---- Begin backtrace for Nested Throwables
javax.faces.application.ViewExpiredException: viewId:/ui/login.jsf - View /ui/login.jsf could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)

This is what the error log displays . This exception trace occurs on any action on page even the button click ,even the select one menu change action listener etc .

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

01 Dec 2011, 23:12

Did you click the URL i copied/pasted in my previous response? I just clicked the URL and saw an answer that might help you.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

02 Dec 2011, 01:49

yes i did . Actually the problem is i deployed the Showcase application on the same server and it works fine . But i am unable to make out the reason for this not to work as all the set and configuration is same as the one in showcase .

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

02 Dec 2011, 04:41

The following article was mentioned at one of the URLs that I posted. Read this article and make code changes according to what is recommended.

http://stackoverflow.com/questions/3642 ... e-restored
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

02 Dec 2011, 07:45

I have implemented the filter for disabling the browser cache . But still it doesnt work . I dont know wat i need to do or what i am missing .

public class NoCacheFilter implements Filter {

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpReq = (HttpServletRequest) request;
HttpServletResponse httpRes = (HttpServletResponse) response;
System.out.println("doing cache check");
if (!httpReq.getRequestURI().startsWith(httpReq.getContextPath() + ResourceHandler.RESOURCE_IDENTIFIER)) { // Skip JSF resources (CSS/JS/Images/etc)
httpRes.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
httpRes.setHeader("Pragma", "no-cache"); // HTTP 1.0.
httpRes.setDateHeader("Expires", 0); // Proxies.
}

chain.doFilter(request, response);
}

// ...

public void init(FilterConfig filterConfig) throws ServletException {
// throw new UnsupportedOperationException("Not supported yet.");
}

public void destroy() {
// throw new UnsupportedOperationException("Not supported yet.");
}

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests