Announcement Announcement Module
No announcement yet.
SWF 2.3 & JSF 2.1: UnsupportedOperationException at javax.faces.context.FacesContext Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF 2.3 & JSF 2.1: UnsupportedOperationException at javax.faces.context.FacesContext


    After updating my webapp from JSF 2.0.4 to 2.1 I've got an error based on a missing operation of the FacesContext.
    Is it possible that it has a dependency to <bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFaces ContextLifecycleListener"/> ?
    Problem occures when richfaces is included into the page.

    Spring 3.0.5
    SWF 2.3
    JSF 2.1
    Richfaces 4.0 Final

    Any ideas why this happen? Or is it a Richfaces-Bug?

    	at javax.faces.context.FacesContext.isReleased(
    	at com.sun.faces.context.PartialViewContextImpl.updateFacesContext(
    	at com.sun.faces.context.PartialViewContextImpl.isAjaxRequest(
    	at javax.faces.context.PartialViewContextWrapper.isAjaxRequest(
    	at org.richfaces.context.ExtendedPartialViewContextImpl.isAjaxRequest(
    	at javax.faces.context.PartialViewContextWrapper.isAjaxRequest(
    	at javax.faces.component.UIViewRoot.getRendersChildren(
    	at javax.faces.component.UIComponent.encodeAll(
    	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(
    	at com.sun.faces.application.view.MultiViewHandler.renderView(
    	at org.springframework.faces.webflow.FlowViewHandler.renderView(
    	at javax.faces.application.ViewHandlerWrapper.renderView(
    	at org.springframework.faces.webflow.FlowViewHandler.renderView(
    	at com.sun.faces.lifecycle.RenderResponsePhase.execute(
    	at com.sun.faces.lifecycle.Phase.doPhase(
    	at com.sun.faces.lifecycle.LifecycleImpl.render(
    	at org.springframework.faces.webflow.FlowLifecycle.render(
    	at org.springframework.faces.webflow.JsfView.render(

  • #2
    Are you using Tomcat? Because if you do, JSF 2.1 does not support it.


    • #3
      Ok, haven't known that. Thanks for your hint. Yes I'm using Tomcat. Seams to be the problem for this.


      • #4
        Just in case, here's the info straight from the horse's mouth:


        • #5
          seams to be a another bug (richfaces or spring). Have the same behavior on glassfisch 3.1 which is officially supported for jsf 2.1.


          • #6
            Try to use JSF 2.0 that worked for me.


            • #7
              I am using SWF 2.3 with JSF 2.1 but I had to download the source and make a change to FlowFacesContext in spring-faces.jar to do it.

              It looks like a new method has been introduced in JSF 2.1 which is called isReleased. This method isn't implemented in FlowFacesContext so when using JSF2.1 the call to this method is completed by the parent of FlowFacesContext which throws the UnsupportedOperationException.

              To get around this I downloaded the source, updated the JSF dependency in the maven pom.xml to be a 2.1 version and then added the isReleased method :-
              public boolean isReleased() {
                  return delegate.isReleased();
              Rebuilt spring-faces.jar and the problem went away.



              • #8
                Sorry forgot to mention... If you follow these instructions and are building with maven then there is a problem with the spring-faces maven pom.xml

                See this thread for details.


                • #9
                  Originally posted by garethwebbley View Post
                  Rebuilt spring-faces.jar and the problem went away.
                  I'm attempting to get JSF 2.1 and SWF 2.3 working together (deploying on GlassFish 3.1.1) and have made a lot of strides, thanks in part to your suggestion about the JSF 2.1 fix above.

                  However, none of my actions seem to be interpreted correctly from the view layer. I can click the commandLink elements to my heart's content, but I always get a new version of the original view. Any ideas what I could be doing wrong? I've done a few SWF apps but none involving JSF until now.