[seam-issues] [JBoss JIRA] Issue Comment Edited: (SEAMFACES-179) s:viewaction not invoked with Mojarra 2.1.2

Brian Leathem (JIRA) jira-events at lists.jboss.org
Tue Jul 26 13:26:23 EDT 2011


    [ https://issues.jboss.org/browse/SEAMFACES-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616541#comment-12616541 ] 

Brian Leathem edited comment on SEAMFACES-179 at 7/26/11 1:24 PM:
------------------------------------------------------------------

I've written some JSFUnit/Arquillian tests for the viewAction, currently targeting JBoss AS6 as a baseline.
There are two tests (available in faces/fetaure/jsfunit_arquillian branch):
{code}
    // testing the viewAction loading data into a property
    @Test
    @InitialPage("/load_data.xhtml")
    public void checkDataLoad(JSFServerSession server,
JSFClientSession client) throws IOException {
        Assert.assertEquals("/load_data.xhtml", server.getCurrentViewID());
        Assert.assertTrue(client.getPageAsText().contains("Data Loaded"));
    }
{code}
{code}
    // testing viewAction navigation
    @Test
    @InitialPage("/goto_result.xhtml")
    public void checkNavigation(JSFServerSession server,
JSFClientSession client) throws IOException {
        Assert.assertEquals("/result.xhtml", server.getCurrentViewID());
        Assert.assertTrue(client.getPageAsText().contains("Result page"));
    }
{code}

The first test works, but the second one fails with the server.log stacktrace:
{code}
2011-07-12 09:23:20,116 DEBUG [org.jboss.seam.faces.event.PhaseEventBridge] (http-localhost%2F127.0.0.1-8080-2) Fired event [javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl at 46ffcd87]] with qualifiers [[Ljava.lang.annotation.Annotation;@38b9d37b]
2011-07-12 09:23:20,117 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/a6c419-34e7-45b1-bc37-e751a70a57c6].[FacesServlet]] (http-localhost%2F127.0.0.1-8080-2) Servlet.service() for servlet FacesServlet threw exception: java.lang.IllegalStateException: Context is already active
        at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:301) [:6.0.0.Final]
        at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:110) [:6.0.0.Final]
        at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:84) [:6.0.0.Final]
        at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:224) [:2.0.3-]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:95) [:2.0.3-]
        at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107) [:2.0.3-]
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-]
        at org.jboss.seam.faces.component.UIViewAction.broadcast(UIViewAction.java:405) [:]
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781) [:2.0.3-]
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246) [:2.0.3-]
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77) [:2.0.3-]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-]
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-]
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
        at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.0.0.Final]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
        at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
        at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
        at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
        at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
{code}

I verified this failure with a manually created example app (available in faces/examples on the develop branch). 

      was (Author: bleathem):
    I've written some JSFUnit/Arquillian tests for the viewAction, currently targeting JBoss AS6 as a baseline.
There are two tests (available in faces/fetaure/jsfunit_arquillian branch):
    // testing the viewAction loading data into a property
    @Test
    @InitialPage("/load_data.xhtml")
    public void checkDataLoad(JSFServerSession server,
JSFClientSession client) throws IOException {
        Assert.assertEquals("/load_data.xhtml", server.getCurrentViewID());
        Assert.assertTrue(client.getPageAsText().contains("Data Loaded"));
    }

    // testing viewAction navigation
    @Test
    @InitialPage("/goto_result.xhtml")
    public void checkNavigation(JSFServerSession server,
JSFClientSession client) throws IOException {
        Assert.assertEquals("/result.xhtml", server.getCurrentViewID());
        Assert.assertTrue(client.getPageAsText().contains("Result page"));
    }

The first test works, but the second one fails with the server.log stacktrace:
https://gist.github.com/1078369
I verified this failure with a manually created example app (available
in faces/examples on the develop branch). 
  
> s:viewaction not invoked with Mojarra 2.1.2
> -------------------------------------------
>
>                 Key: SEAMFACES-179
>                 URL: https://issues.jboss.org/browse/SEAMFACES-179
>             Project: Seam Faces
>          Issue Type: Bug
>    Affects Versions: 3.0.2
>         Environment: JBoss 6.1.0-SNAPSHOT (Hudson build) with updated Weld 1.1.1-Final and updated Mojarra 2.1.2
>            Reporter: Sebastian Sachtleben
>            Assignee: Brian Leathem
>             Fix For: 3.0.3
>
>
> s:viewAction will not invoke after updating to Mojarra 2.1.2.
> Tested with:
> 	<f:metadata>	
> 		<s:viewAction action="#{myBean.validate}"/>
> 	</f:metadata>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list