• Post Reply Bookmark Topic Watch Topic
  • New Topic

NamespaceHandler giving NPE for UI tag library in JSF2  RSS feed

Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are migrating from JSF1.2 to JSF2 using Websphere 8 server (in IRAD8) and using apache myfaces for JSF.
Web.xml is changed to version 3.0

and faces-config.xml to version 2.0

In my web project, I have following jars in WEB-INF/lib:

While rendering jsf page that has ui:composition tag, it gives NPE at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57).

After debugging I found that for ui:composition tag it creates org.apache.myfaces.view.facelets.compiler.TrimmedTagUnit object in org.apache.myfaces.view.facelets.compiler.CompilationManager.pushTag(Tag) method line 221.
On this TagUnit when createFaceletHandler() is invoked it further calls org.apache.myfaces.view.facelets.tag.CompositeTagLibrary.createTagHandler(..) that checks if the list of namespaces (these are namespaces in .taglib.xml file in META-INF of the jars present in WEB-INF/lib directory) contains required namespace of facelet "http://java.sun.com/jsf/facelets".
There is no jar in WEB-INF/lib that contains the taglib and hence it returns handler as null.

What could have gone wrong here? Did I missed any library to add in lib folder?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!