ICEfaces
  1. ICEfaces
  2. ICE-2444

UnsupportedOperationException with JSF 1.2 on Tomcat 6

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#2
    • Fix Version/s: 1.7Beta1, 1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      Tomcat 6, JSF 1.2, just-ice.jar, Facelets

      Description

      SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
      java.lang.UnsupportedOperationException
      at javax.faces.context.ExternalContext.setRequestCharacterEncoding(ExternalContext.java:408)
      at javax.faces.application.ViewHandler.initView(ViewHandler.java:270)
      at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:103)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
      at com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:25)
      at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:146)
      at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
      at com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:30)
      at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:48)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
      at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
      at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:117)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:37)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

        Issue Links

          Activity

          Hide
          Tyler Johnson added a comment -

          Application demonstrating the issue

          Show
          Tyler Johnson added a comment - Application demonstrating the issue
          Hide
          Tyler Johnson added a comment -

          One important thing to mention, if you remove the just-ice.jar, the issue goes away.

          Tyler

          Show
          Tyler Johnson added a comment - One important thing to mention, if you remove the just-ice.jar, the issue goes away. Tyler
          Hide
          Ted Goddard added a comment -

          The exception can be fixed by implementing initView in the D2DViewHandler, however a problem still remains that the page is blank on subsequent reloads of the facelet page.

          The following may be a fix; in BridgeFacesContext, remove the viewRoot (as the standard JSF ViewHandler does) during release for facelet views:

          public void release() {
          faceMessages.clear();
          renderResponse = false;
          responseComplete = false;
          setCurrentInstance(null);
          if (isFaceletView)

          { viewRoot = null; }

          }

          (Facelets is efficient at rebuilding the component tree, so this should work well, assuming the component IDs are assigned in a repeatable fashion.)

          Show
          Ted Goddard added a comment - The exception can be fixed by implementing initView in the D2DViewHandler, however a problem still remains that the page is blank on subsequent reloads of the facelet page. The following may be a fix; in BridgeFacesContext, remove the viewRoot (as the standard JSF ViewHandler does) during release for facelet views: public void release() { faceMessages.clear(); renderResponse = false; responseComplete = false; setCurrentInstance(null); if (isFaceletView) { viewRoot = null; } } (Facelets is efficient at rebuilding the component tree, so this should work well, assuming the component IDs are assigned in a repeatable fashion.)
          Hide
          Ted Goddard added a comment -

          Mark, could you comment on the proposed fix?

          Show
          Ted Goddard added a comment - Mark, could you comment on the proposed fix?
          Hide
          Ted Goddard added a comment -

          Reverting to the version of JSF currently shipping with ICEfaces (1.2_04-b10-p01 vs 1.2_05-b06-FCS) fixes the blank page on reload problem. I will revert the JSF version and proceed with the other aspect of the fix (if necessary; it may entirely be a JSF version-specific interaction).

          Show
          Ted Goddard added a comment - Reverting to the version of JSF currently shipping with ICEfaces (1.2_04-b10-p01 vs 1.2_05-b06-FCS) fixes the blank page on reload problem. I will revert the JSF version and proceed with the other aspect of the fix (if necessary; it may entirely be a JSF version-specific interaction).
          Hide
          Ted Goddard added a comment -

          A fix for this particular issue is now checked in. It is marked with a TODO section, however, as the complete fix requires implementation of setCharacterEncoding on our Request object. Character encoding support (other than unicode) needs to be looked at throughout the stack.

          The blank page upon reload problem is actually an incompatibility with JSF 1.2_05-b06-FCS and potentially later releases that needs to be investigated further.

          Show
          Ted Goddard added a comment - A fix for this particular issue is now checked in. It is marked with a TODO section, however, as the complete fix requires implementation of setCharacterEncoding on our Request object. Character encoding support (other than unicode) needs to be looked at throughout the stack. The blank page upon reload problem is actually an incompatibility with JSF 1.2_05-b06-FCS and potentially later releases that needs to be investigated further.

            People

            • Assignee:
              Unassigned
              Reporter:
              Tyler Johnson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: