ICEfaces
  1. ICEfaces
  2. ICE-3137

Facelets bug throws exception for every IceFaces tag

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      I discovered this issue using JBoss 4.2.0, Seam 2.0.0 and IceFaces 1.7.0, but I don't believe any of that is relevant other than the IceFaces version.

      Description

      There is a bug in Facelets that is throwing an exception for every IceFaces tag on the page. This is a Facelets bug not IceFaces, but since it is likely negatively affecting the performance of IceFaces when used with facelets, I thought I would pass on the information.

      The facelets code in question, com.sun.facelets.util.DevTools.writeAttributes, swallows the exception so it's not causing functional problems, but it can't be very good for performance. What is happening is that the writeAttributes method uses Introspector.getBeanInfo, followed by getPropertyDescriptors on each component to create a list of attributes to write out. Unfortunately, there is a bug in their code, so they don't do a null check on the readMethod of the propertyDescriptor before invoking it, so any descriptor that is found through the Introspector, that does not have a read method will generate a NullPointerException. When the Introspector does a getBeanInfo on the IceFaces UIXhtmlComponent class it finds the setXmlAttributes method and returns it in the list of propertyDescriptors, but there is no matching getXmlAttributes so it falls into the case I just described and generates an NPE for every component.

      I have logged an issue with Facelets:
      https://facelets.dev.java.net/issues/show_bug.cgi?id=316

      This issue is in every version of Facelets I have looked at to date.

      Anyway, I thought someone would like to know and make a call as to whether to create a BeanInfo for UIXhtmlComponent or some other workaround until the facelets team can address the issue.

        Activity

        Greg Stacey created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Fix Version/s 1.7.1 [ 10122 ]
        Assignee Priority P3
        Affects Version/s 1.7 [ 10080 ]
        Assignee Mark Collette [ mark.collette ]
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P3
        Assignee Mark Collette [ mark.collette ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Greg Stacey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: