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

                 Key: MYFACES-2784
                 URL: https://issues.apache.org/jira/browse/MYFACES-2784
             Project: MyFaces Core
          Issue Type: Bug
            Reporter: Jan-Kees van Andel


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to