This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NamespaceHandler giving NPE for UI tag library in JSF2

 
Deepa More
Ranch Hand
Posts: 68
  • 0
  • 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:
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-digester-1.8.jar
commons-fileupload-1.2.1.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-lang-2.3.jar
tomahawk20-1.1.14.jar

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