-
1. Re: Seam and clustering
matt.hibb Jan 8, 2010 2:31 AM (in response to matt.hibb)I can also reproduce this with 1 server as follows:
1. Load the page
2. Restart JBoss
3. Click the buttonThis seems to me to point to something obvious (probably lacking in my knowledge), but I dont know what!
-
2. Re: Seam and clustering
swd847 Jan 8, 2010 2:46 AM (in response to matt.hibb)can you post the component definition?
-
3. Re: Seam and clustering
kapitanpetko Jan 8, 2010 2:59 AM (in response to matt.hibb)I haven't used clustering with EC2 but the recommended approach is to use sticky sessions. That is, each request from the same client goes to the same node. Only if that node fails, the request goes to a different node. What is MyComponent? EJB?
-
4. Re: Seam and clustering
matt.hibb Jan 8, 2010 7:05 AM (in response to matt.hibb)The load balancers that EC2 provides don't support sticky sessions unfortunately, else I would have already done that.
Yes, MyComponent is a stateful EJB.
Another thing to note: If I load the page in question in 1 browser (say Firefox), restart JBoss, then load the page in another browser (say IE) and now try clicking the button in the original browser, it works!
Seems to me to suggest something about the beans/components backing the page haven't been initialised fully without the server at least loading the page 1st before the button is clicked. Does this offer any clues?@Stuart: I shall post my component definition asap in the morning, its at work and I cant 100% remember it ;)
-
5. Re: Seam and clustering
walterjwhite Jan 8, 2010 2:39 PM (in response to matt.hibb)Matt,
I would just add that your component should implement the Serializable interface then.
Walter
-
6. Re: Seam and clustering
matt.hibb Jan 8, 2010 4:25 PM (in response to matt.hibb)@Walter - MyComponent already implements Serializable.
Here is my component definition:
@Name("my.seam.component.MyComponent") @Stateful @Clustered public class MyComponentBean implements MyComponent
@Local public interface MyComponent extends Serializable
-
7. Re: Seam and clustering
matt.hibb Jan 8, 2010 6:46 PM (in response to matt.hibb)So I upgraded to Seam 2.2.0 GA and the exception I get changed to the following:
10:42:50,564 ERROR [Exceptions] handled and logged exception java.lang.IllegalStateException: Unable to read view /view.xhtml to execute action "#{my.seam.component.MyComponent.doSomething}" at org.jboss.seam.navigation.SafeActions.isActionSafe(SafeActions.java:67) at org.jboss.seam.navigation.Pages.callAction(Pages.java:688) at org.jboss.seam.navigation.Pages.preRender(Pages.java:330) at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:561) at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:472) at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148) at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118) at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:522) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 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:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:135) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94) at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
-
8. Re: Seam and clustering
kapitanpetko Jan 9, 2010 4:50 AM (in response to matt.hibb)
Matthew Hibberd wrote on Jan 08, 2010 18:46:
So I upgraded to Seam 2.2.0 GA and the exception I get changed to the following:10:42:50,564 ERROR [Exceptions] handled and logged exception java.lang.IllegalStateException: Unable to read view /view.xhtml to execute action ...
Is this the full stack trace? And before you go any further, are you sure session replication and SFSB state replication work correctly? Both use UDP by default, maybe EC2 is blocking it?