[jboss-jira] [JBoss JIRA] (AS7-4048) JSF deployment failing on (clustered) domain mode with ViewExpiredException but works in standalone
Stan Silvert (JIRA)
jira-events at lists.jboss.org
Wed May 2 13:23:18 EDT 2012
[ https://issues.jboss.org/browse/AS7-4048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689729#comment-12689729 ]
Stan Silvert commented on AS7-4048:
-----------------------------------
There is lots of discussion on the net about client side vs. server side state saving. Which one you choose depends on your application and its requirements. It's not always an easy choice and it can require a lot of testing to find out which is best.
The problem we ran into pretty much never happens in the real world. Two clients don't normally share the same HttpSession. In fact, if you run your application the old way, it will still work with server-side state saving. You just need to hit it from two different browsers. For instance, I tried it on my machine with FireFox and Chrome. It worked perfectly with state saving set to "server".
As you know, the usual purpose of HttpSession replication is for failover. This usually means I'm using "sticky" sessions. If one server dies, the next request will fail over to the replicated session on another box. In this case, your application will still work even with server-side state saving. The view ID will not get out of sync with the session because I am only hitting it from one browser tab.
The way we ran into trouble was that we hit two different ports with two different browser tabs. This caused the same session ID to be used in both tabs. But the View ID's are stored in a hidden field of the form. So each tab send a different View ID and they got out of sync.
> JSF deployment failing on (clustered) domain mode with ViewExpiredException but works in standalone
> ---------------------------------------------------------------------------------------------------
>
> Key: AS7-4048
> URL: https://issues.jboss.org/browse/AS7-4048
> Project: Application Server 7
> Issue Type: Bug
> Components: JSF
> Affects Versions: 7.1.0.Final
> Reporter: Galder Zamarreño
> Assignee: Stan Silvert
> Fix For: 7.1.2.Final-redhat1
>
> Attachments: infinispan-as7.cli, infinispan-jboss-as7.war, server-four.log, server-three.log, web.xml
>
>
> I'm trying to run https://github.com/galderz/infinispan-quickstart/tree/t_710final/jboss-as7 in AS 7.1.0.Final domain mode but it fails.
> It does work fine in standalone mode. And it works fine domain too if you only hit one of the nodes, but not after both have been hit.
> So, in domain mode (regardless of browser, tried with Chrome and Firefox), once two servers are up and running and the app has been deployed to both nodes, when I try to enter a new cache entry in one of the nodes, I get:
> {code}Caused by: javax.faces.application.ViewExpiredException: viewId:/home.jsf - View /home.jsf could not be restored.
> at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]{code}
> This is pretty cryptic. After adding some logging, I see an exception being thrown earlier in the code:
> {code}11:58:57,844 FINE [javax.enterprise.resource.webcontainer.jsf.application] (MSC service thread 1-3) java.lang.NoSuchMethodException: org.jboss.as.web.deployment.jsf.JandexAnnotationProvider.<init>(javax.servlet.ServletContext, com.sun.faces.spi.AnnotationProvider): java.lang.NoSuchMethodException: org.jboss.as.web.deployment.jsf.JandexAnnotationProvider.<init>(javax.servlet.ServletContext, com.sun.faces.spi.AnnotationProvider)
> at java.lang.Class.getConstructor0(Class.java:2706) [classes.jar:1.6.0_29]
> at java.lang.Class.getDeclaredConstructor(Class.java:1985) [classes.jar:1.6.0_29]
> at com.sun.faces.spi.ServiceFactoryUtils.getProviderFromEntry(ServiceFactory.java:83) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> at com.sun.faces.spi.AnnotationProviderFactory.createAnnotationProvider(AnnotationProviderFactory.java:70) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> at com.sun.faces.config.ConfigManager$AnnotationScanTask.<init>(ConfigManager.java:808) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:349) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.10.Final.jar:]
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.10.Final.jar:]
> at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_29]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_29]
> at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_29]{code}
>
> I don't know whether this is relevant at all.
> Please find attached a war and server.log files with TRACE on:
> org.jboss.weld
> org.jboss.solder
> javax.enterprise.resource.webcontainer.jsf (a very "intuitive" package for com.sun.faces, grrr)
> javax.faces
> org.infinispan
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list