Bringing military-grade cybersecurity solutions to the enterprise and critical systems.
Telephone: 310.356.7869

XML Parsing Error: mismatched tag. Expected: tbody

Category: ExceptionOfTheDay

12:55 AM, Thu, Sep 13 2007

Today's Exception of the Day is actually an error message that shows up when you view the page in a browser:

XML Parsing Error: mismatched tag. Expected: </tbody>

This happens when you are using a rich:dataGrid, and the value attribute is an empty collections. For example, if it is:

<rich:dataGrid value="#{myCollection}">

and myCollection happens to be empty, you'll get this error.

The solution is to test for an empty collection:

<rich:dataGrid rendered="#{not empty myCollection}"

<h:outputText rendered="#{empty myCollection}" 
value="myCollection was empty"/>