ICEfaces
  1. ICEfaces
  2. ICE-2208

ICEfaces + Facelets + JSF 1.1 + Tomcat 6 problem

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1, 1.7DR#1
    • Fix Version/s: 1.6.2, 1.7DR#2, 1.7
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces, Facelets, JSF 1.1, Tomcat 6

      Description

      If you try to load a trivial Facelets page, then you get this exception:

      javax.faces.FacesException: Problem in renderResponse: Could not instantiate feature[compiler.ExpressionFactory]: com.sun.el.ExpressionFactoryImpl
          com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:324)
          com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
          com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
          com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
          com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
          com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:26)
          com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:143)
          
      *root cause*

      com.sun.facelets.FaceletException: Could not instantiate feature[compiler.ExpressionFactory]: com.sun.el.ExpressionFactoryImpl
          com.sun.facelets.compiler.Compiler.featureInstance(Compiler.java:157)
          com.sun.facelets.compiler.Compiler.createExpressionFactory(Compiler.java:146)
          com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:193)
          com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
          com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
          com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:303)
          com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
          com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
          com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
          com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
          com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:26)
          com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:143)


      It appears that, under Tomcat 6, they have their own EL implementation, and don't use the com.sun.el.* one. With Facelets 1.1.11 (not sure about Facelets 1.1.14) there is a "feature" called "compiler.ExpressionFactory" which defaults to "com.sun.el.ExpressionFactoryImpl". Trying to instantiate that class is what causes the exception. There's a method on the Compiler class to set this "feature", but I'm not aware of any code that itself grabs it out of the web.xml.

      So, we could add code to set the feature from the web.xml ourself, and then tell people how to configure their web.xml with Tomcat 6 and JSF 1.1 to use this.

      Or, we could make a small JAR with a dummy com.sun.el.ExpressionFactoryImpl class that would delegate to the Apache ExpressionFactory, and tell people to just include that JAR with their WAR.

      Or, since we ship our own Facelets, we could alter it so that if nothing is configured, it would first try the com.sun.el ExpressionFactory and then try the org.apache ExpressionFactory. That would only take 3 lines of code or so.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15024 Thu Oct 25 12:23:20 MDT 2007 mark.collette Backport to 1.6.2 : ICE-2072,ICE-2208
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/lib/icefaces-facelets.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14974 Wed Oct 17 18:58:05 MDT 2007 mark.collette ICE-2208 : ICEfaces + Facelets + JSF 1.1 + Tomcat 6 problem
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/lib/icefaces-facelets.jar

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: