Two things:
Firstly, your project structure is incorrect. All web files must enter WebContent.
root
...
WebContent
META-INF
resources
css
images
javascript
templates
commonLayout.xhtml
footer.xhtml
header.xhtml
views
main
index.xhtml
WEB-INF
index.jsp
This, however, would lead to a 404 error, and not to this exception. Therefore, I will consider that it was your negligence in formulating the question.
-, template ui:composition /, WebContent. /, . , Facelets /views/main/templates/commonLayout.xhtml, . , template :
<ui:composition template="/templates/commonLayout.xhtml">