After I typed the example code in the chapter 8.5 Composite Components in my IDE and run the example on GlassFish4.0, I got an error.

java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1078) at com.sun.faces.util.Cache.get(Cache.java:116) at com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:237) at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:951) at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:648)

Then I check the older version of this tutorial, I found a difference in email.xhtml code. The namespace has been changed from Java EE 7. After I changed the namespace back to JavaEE 6 version, it works.

Someone on the StackOverflow told me that this may caused byGlassfish has attempted to download a schema corresponding to one of those namespaces, and received a response that it can't handle. I don't know whether is the real root cause. Is there anyone has the same problem?