aspose file tools*
The moose likes JSF and the fly likes NamespaceHandler giving NPE for UI tag library in JSF2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "NamespaceHandler giving NPE for UI tag library in JSF2" Watch "NamespaceHandler giving NPE for UI tag library in JSF2" New topic
Author

NamespaceHandler giving NPE for UI tag library in JSF2

Deepa More
Ranch Hand

Joined: May 22, 2006
Posts: 68
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NamespaceHandler giving NPE for UI tag library in JSF2