webtier@glassfish.java.net

Re: Debugging JSF2 / XHMTL pages

From: <webtier_at_javadesktop.org>
Date: Wed, 01 Sep 2010 13:59:32 PDT

I've fought this error as well. After debugging through the 2.0.3 source it initially appeared the UIViewRoot element was somehow turning up null. Hence the reason for the "null source" and empty component tree output in the web browser. After digging a little further, I discovered there was an exception being thrown in the DefaultFaceletCache class:


public DefaultFacelet getMetadataFacelet(URL url) throws IOException {
    DefaultFacelet f = null;
    
    try {
        f = _metadataFaceletCache.get(url).getFacelet(); // Exception thrown here.
    } catch (ExecutionException e) {
        _unwrapIOException(e);
    }
    return f;
}

In my case the exception was:
"Error Parsing /sign_in.xhtml: Error Traced[line: 26] The element type "meta" must be terminated by the matching end-tag "</meta>"." However, the exception is subsequently swallowed and never sees the light of day.


Long story short -- XHTML requires all tags to be terminated, and in my case, the <meta> tag wasn't. Terminating the tag corrected the issue.



Andrew
[Message sent by forum member 'andrewlaughlin']

http://forums.java.net/jive/thread.jspa?messageID=481616