Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2784

NPE when I forget to add an interface to a composite component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1
    • None
    • None

    Description

      When I write a composite component like the following:

      <?xml version="1.0" encoding="UTF-8"?>
      <ui:composition ...>
      <div>
      <h2>Spaces</h2>
      <ul>
      <ui:repeat value="#

      {spacesBean.spaces}

      " var="space">
      <li>
      <parleys:spaceLink space="#

      {space}

      " renderThumbnail="true" renderLabel="true"/>
      </li>
      </ui:repeat>
      </ul>
      </div>
      </ui:composition>

      I get a NPE on line 1101 in ApplicationImpl, because there is no component metadata. Of course I made a mistake here, but a NPE isn't very helpful.

      There is a "SEVERE: Cannot found composite bean descriptor UIComponent.BEANINFO_KEY" in the logs, but it's swallowed by a huge stack trace.

      I suggest to throw a descriptive exception instead of logging the message.

      Attachments

        Activity

          People

            jakobkorherr Jakob Korherr
            jankeesvanandel JCC Van Andel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: