ICEfaces
  1. ICEfaces
  2. ICE-1273

Document com.sun.faces.config.ConfigureListener work-around in Release Notes to avoid JSF initialization problems

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.2, 1.7DR#1, 1.7
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Sun RI, Tomcat 5.5, JBoss 4.0.x
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      <listener>
      <listener-class>
      com.sun.faces.config.ConfigureListener
      </listener-class>
      </listener>
      Show
      <listener> <listener-class> com.sun.faces.config.ConfigureListener </listener-class> </listener>

      Description

      We continue to get a boat load of complaints about JSF initialization issues, mostly in Tomcat. A lot of these issues can be resolved simply by including the following listener in the web.xml:

      <listener>
      <listener-class>
      com.sun.faces.config.ConfigureListener
      </listener-class>
      </listener>

      I suggest we include this in all our sun ri-based demos.

        Activity

        Philip Breau created issue -
        Philip Breau made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ] Patrick Corless [ patrick.corless ]
        Ken Fyten made changes -
        Affects Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Assignee Patrick Corless [ patrick.corless ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Assignee Patrick Corless [ patrick.corless ]
        Hide
        Ken Fyten added a comment -

        Waiting for a final determination on whether this is required in the web.xml file or not.

        Show
        Ken Fyten added a comment - Waiting for a final determination on whether this is required in the web.xml file or not.
        Hide
        Patrick Corless added a comment -

        There is surprising little information about this class on the web. The class resides in the jsf-impl.jar but does not appear to be available in the Myfaces implementation.

        The only concrete information I found was from the JSF wiki on java.net. Here's the quote

        "com.sun.faces.config.ConfigureListener (used to parse configuration resources and bootstrap the application)"

        Philip can you think of any examples that I can use to test out the effectiveness of this listener?

        Show
        Patrick Corless added a comment - There is surprising little information about this class on the web. The class resides in the jsf-impl.jar but does not appear to be available in the Myfaces implementation. The only concrete information I found was from the JSF wiki on java.net. Here's the quote "com.sun.faces.config.ConfigureListener (used to parse configuration resources and bootstrap the application)" Philip can you think of any examples that I can use to test out the effectiveness of this listener?
        Hide
        Philip Breau added a comment -

        The most common problem occurs with people using the Windows service install of Tomcat 5.5.x. If you try to run any of our pre-built demos on this particular Tomcat, they blow up. If you stick the com.sun.faces.config.ConfigureListener in the web.xml they work fine. I don't have any other info on the listener aside from the fact that it's declared in the jsf-impl.jar and should be loaded automatically without explicitly putting it your web.xml, but I guess this version of Tomcat doesn't load it properly from inside the jar. Unfortunately, a lot of people use this version of Tomcat.

        Show
        Philip Breau added a comment - The most common problem occurs with people using the Windows service install of Tomcat 5.5.x. If you try to run any of our pre-built demos on this particular Tomcat, they blow up. If you stick the com.sun.faces.config.ConfigureListener in the web.xml they work fine. I don't have any other info on the listener aside from the fact that it's declared in the jsf-impl.jar and should be loaded automatically without explicitly putting it your web.xml, but I guess this version of Tomcat doesn't load it properly from inside the jar. Unfortunately, a lot of people use this version of Tomcat.
        Hide
        Patrick Corless added a comment -

        Thanks for the information, it puts the listener into context. I'll make sure this make sure this enhancement makes 1.6.

        Show
        Patrick Corless added a comment - Thanks for the information, it puts the listener into context. I'll make sure this make sure this enhancement makes 1.6.
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Assignee Patrick Corless [ patrick.corless ]
        Patrick Corless made changes -
        Assignee Patrick Corless [ patrick.corless ]
        Hide
        Patrick Corless added a comment -

        Arran please take care of this configuration issue with our sample applications. By adding the configuration listener to our ossrepo/icefaces/trunk/icefaces/sample/ applicaitons we should avoid some support issues.

        So please add the listener to the web.xml as specified by Philip. Just be sure to respect the associated web.xml dtd ordering.

        Show
        Patrick Corless added a comment - Arran please take care of this configuration issue with our sample applications. By adding the configuration listener to our ossrepo/icefaces/trunk/icefaces/sample/ applicaitons we should avoid some support issues. So please add the listener to the web.xml as specified by Philip. Just be sure to respect the associated web.xml dtd ordering.
        Patrick Corless made changes -
        Assignee Patrick Corless [ patrick.corless ] Arran McCullough [ amccullough ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14603 Fri Aug 03 09:01:28 MDT 2007 arran.mccullough ICE-1273: Include com.sun.faces.config.ConfigureListener in Sample apps to avoid JSF initialization problems. Listener has been implemented to all sample applications including the tutorial sample applications.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone2/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone7/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/basicInputText/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/conf/web.sunri.icefaces.ce.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone5/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/effects1/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/address-demo/conf/web.sunri.icefaces.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone1/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/effects2/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/tiles/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/auctionMonitor/config/web.sunri.icefaces.ce.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone3/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone6/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/timezone4/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/dragdrop1/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/tutorial/dragdrop2/web/WEB-INF/web.xml
        Hide
        Arran McCullough added a comment -

        Implemented Rev 14603

        Listener added to all sample applications.
        Did find an odd error when testing though. When the listener is in the web.xml and the application is deployed (Using Tomcat 5.0.28 pr Tomcat 5.5.23) an error is thrown:

        SEVERE: Skipped installing application listeners due to previous error(s)
        SEVERE: Error listenerStart
        SEVERE: Content startup failed due to previous errors

        SEVERE: Error configuring application listener of class com.sun.config.ConfigureListener
        java.lang.ClassNotFoundException: com.sun.config.ConfigureListener
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

        When the listener is taken out of the web.xml, the application runs fine with no error. Then when the listener is added back to the web.xml the application runs fine with no error. This may just be a configuration problem with my Tomcat servers, although I did use a brand new download of Tomcat 5.5.23 to test.

        Show
        Arran McCullough added a comment - Implemented Rev 14603 Listener added to all sample applications. Did find an odd error when testing though. When the listener is in the web.xml and the application is deployed (Using Tomcat 5.0.28 pr Tomcat 5.5.23) an error is thrown: SEVERE: Skipped installing application listeners due to previous error(s) SEVERE: Error listenerStart SEVERE: Content startup failed due to previous errors SEVERE: Error configuring application listener of class com.sun.config.ConfigureListener java.lang.ClassNotFoundException: com.sun.config.ConfigureListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) When the listener is taken out of the web.xml, the application runs fine with no error. Then when the listener is added back to the web.xml the application runs fine with no error. This may just be a configuration problem with my Tomcat servers, although I did use a brand new download of Tomcat 5.5.23 to test.
        Arran McCullough made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        Philip, Judy is reporting a problem with this configuration listener in Jboss 4.2. Any thought as to what we should do about this issue? Is Jboss more common then Tomcat in our community?

        Show
        Patrick Corless added a comment - Philip, Judy is reporting a problem with this configuration listener in Jboss 4.2. Any thought as to what we should do about this issue? Is Jboss more common then Tomcat in our community?
        Hide
        Patrick Corless added a comment -

        Hate to to this but could you please remove the listener. It is causing a lot of issue with Jboss and other containers. Please close the bug and mark it as won't fix once the changes have been reverted.

        Show
        Patrick Corless added a comment - Hate to to this but could you please remove the listener. It is causing a lot of issue with Jboss and other containers. Please close the bug and mark it as won't fix once the changes have been reverted.
        Hide
        Arran McCullough added a comment -

        Rev 14674

        Reverted Changes, removed listener in all sample applications.

        Show
        Arran McCullough added a comment - Rev 14674 Reverted Changes, removed listener in all sample applications.
        Arran McCullough made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Philip Breau added a comment -

        please define which version of jboss and other containers this caused a problem with details of the exception

        Show
        Philip Breau added a comment - please define which version of jboss and other containers this caused a problem with details of the exception
        Philip Breau made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Arran McCullough [ amccullough ] Patrick Corless [ patrick.corless ]
        Hide
        Ken Fyten added a comment -

        We do not want to add something to our standard web.xml files to accommodate a bug in a single version of a specific app. server.
        This issue is documented in the Known Issues section of the ReleaseNotes.html, and has been for several releases. Here's the writeup:

        • Apache Tomcat v5.5

        o Tutorials bundled with the ICEfaces release will not build and deploy to Tomcat 5.5 with MyFaces due to a conflict related to jsp-api.jar. To build and deploy tutorials on Tomcat 5.5 with MyFaces, it is necessary to modify the .../install_dir/ICEfaces-1.5/icefaces/samples/tutorial/build.properties and set tomcat55=true prior to building the application.

        o Applications deployed to a Tomcat instance installed as a Windows service may experience the following error: "SEVERE: ICEfaces could not initialize JavaServer Faces. Please check that the JSF .jar files are installed correctly." This issue can be resolved by including the following listener in the web.xml:

        <listener>
        <listener-class>
        com.sun.faces.config.ConfigureListener
        </listener-class>
        </listener>

        Show
        Ken Fyten added a comment - We do not want to add something to our standard web.xml files to accommodate a bug in a single version of a specific app. server. This issue is documented in the Known Issues section of the ReleaseNotes.html, and has been for several releases. Here's the writeup: Apache Tomcat v5.5 o Tutorials bundled with the ICEfaces release will not build and deploy to Tomcat 5.5 with MyFaces due to a conflict related to jsp-api.jar. To build and deploy tutorials on Tomcat 5.5 with MyFaces, it is necessary to modify the .../install_dir/ICEfaces-1.5/icefaces/samples/tutorial/build.properties and set tomcat55=true prior to building the application. o Applications deployed to a Tomcat instance installed as a Windows service may experience the following error: "SEVERE: ICEfaces could not initialize JavaServer Faces. Please check that the JSF .jar files are installed correctly." This issue can be resolved by including the following listener in the web.xml: <listener> <listener-class> com.sun.faces.config.ConfigureListener </listener-class> </listener>
        Ken Fyten made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Hide
        Philip Breau added a comment -

        Then the release notes should probably also note that the problem occurs on the following app servers:

        JBoss 4.0.3
        JBoss 4.0.4
        JBoss 4.0.5
        Tomcat 5.5.x (non-windows service version)

        Show
        Philip Breau added a comment - Then the release notes should probably also note that the problem occurs on the following app servers: JBoss 4.0.3 JBoss 4.0.4 JBoss 4.0.5 Tomcat 5.5.x (non-windows service version)
        Ken Fyten made changes -
        Resolution Won't Fix [ 2 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Patrick Corless [ patrick.corless ] Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Fix Version/s 1.7DR#1 [ 10100 ]
        Ken Fyten made changes -
        Summary Include com.sun.faces.config.ConfigureListener in Sample apps to avoid JSF initialization problems Document com.sun.faces.config.ConfigureListener work-around in Release Notes to avoid JSF initialization problems
        Environment Sun RI, Tomcat Sun RI, Tomcat 5.5, JBoss 4.0.x
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Task [ 3 ]
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.6.2 [ 10111 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15042 Mon Oct 29 14:52:41 MDT 2007 ken.fyten ICE-1273 - Initial draft update for 1.6.2 release.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/docs/ReleaseNotes.html
        Hide
        Ken Fyten added a comment -

        Added section to Known Issues in Release Notes for 1.6.2.

        ICEfaces/branches/icefaces-1.6/icefaces/docs/ReleaseNotes.html
        Committed revision 15042.

        Show
        Ken Fyten added a comment - Added section to Known Issues in Release Notes for 1.6.2. ICEfaces/branches/icefaces-1.6/icefaces/docs/ReleaseNotes.html Committed revision 15042.
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Ken Fyten [ ken.fyten ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: