javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2914

Resource Contact does not work when partial state is disabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.1
    • Component/s: resources
    • Labels:
      None
    • Environment:

      Glassfish 4.0

      Description

      I am using the new template contract feature in JSF 2.2. When I disabled partial state saving, I got this error

      javax.faces.view.facelets.TagAttributeException: /index.xhtml @6,43 <ui:composition template="/layout.xhtml"> Invalid path : /layout.xhtml.

      This can be reproduced easily with the example application "contracts" in glassfish/j2ee. Here are the changes I did .
      1.configure the web.xml to disable partial state saving
      2. add a very simple form to index.xhtml. Submit the form to refresh the form(action method will return null).

        Activity

        Hide
        Manfred Riem added a comment -

        Resetting initial priority. Triage will determine priority.

        Show
        Manfred Riem added a comment - Resetting initial priority. Triage will determine priority.
        Hide
        Ed Burns added a comment -

        Reproducer. I do see the error described by the user with the latest code:

        exception

        javax.servlet.ServletException: /index.xhtml @48,52 <ui:composition template="/template.xhtml"> Invalid path : /template.xhtml

        root cause

        javax.faces.view.facelets.TagAttributeException: /index.xhtml @48,52 <ui:composition template="/template.xhtml"> Invalid path : /template.xhtml

        Stack trace:

        WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
        javax.faces.view.facelets.TagAttributeException: /index.xhtml @48,52 <ui:composition template="/template.xhtml"> Invalid path : /template.xhtml
        at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:174)
        at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
        at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
        at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
        at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
        at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:161)
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:980)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:680)

        Show
        Ed Burns added a comment - Reproducer. I do see the error described by the user with the latest code: exception javax.servlet.ServletException: /index.xhtml @48,52 <ui:composition template="/template.xhtml"> Invalid path : /template.xhtml root cause javax.faces.view.facelets.TagAttributeException: /index.xhtml @48,52 <ui:composition template="/template.xhtml"> Invalid path : /template.xhtml Stack trace: WARNING: StandardWrapperValve [Faces Servlet] : PWC1406: Servlet.service() for servlet Faces Servlet threw exception javax.faces.view.facelets.TagAttributeException: /index.xhtml @48,52 <ui:composition template="/template.xhtml"> Invalid path : /template.xhtml at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:174) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87) at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:161) at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:980) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:680)
        Hide
        Manfred Riem added a comment -

        Applied to 2.2 branch,

        svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2914, r=rogerk, make sure the RLC context gets restored when a FSS view gets restored."
        Sending jsf-ri\src\main\java\com\sun\faces\application\view\FaceletFullStateManagementStrategy.java
        Sending test\agnostic\vdl\facelets\contracts\basic\src\main\webapp\index.xhtml
        Adding test\agnostic\vdl\facelets\contracts\basic\src\test\java\com\sun\faces\test\agnostic\vdl\facelets\contracts\basic\Issue2914IT.java
        Transmitting file data ...
        Committed revision 12056.

        Show
        Manfred Riem added a comment - Applied to 2.2 branch, svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2914 , r=rogerk, make sure the RLC context gets restored when a FSS view gets restored." Sending jsf-ri\src\main\java\com\sun\faces\application\view\FaceletFullStateManagementStrategy.java Sending test\agnostic\vdl\facelets\contracts\basic\src\main\webapp\index.xhtml Adding test\agnostic\vdl\facelets\contracts\basic\src\test\java\com\sun\faces\test\agnostic\vdl\facelets\contracts\basic\Issue2914IT.java Transmitting file data ... Committed revision 12056.

          People

          • Assignee:
            Manfred Riem
            Reporter:
            jasonzhang2002gmailcom
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: