Error in Name Space after migrating to JSF 2.2

2020-03-29 02:43发布

I am facing below issue, after I migrated to JSF2.2

 com.sun.faces.config.ConfigurationException: The tag named passThroughAttribute from namespace http://xmlns.jcp.org/jsf/core has a null handler-class defined
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:422) [:2.2.0]
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:378) [:2.2.0]
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:321) [:2.2.0]
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270) [:2.2.0]
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437) [:2.2.0]
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) [:2.2.0]

I have made changes as per specifications as well I went through below url : http://jsfcorner.blogspot.in

and My changes are like:

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

and including passthrough as well

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
    xmlns:p="http://primefaces.org/ui">

1条回答
The star\"
2楼-- · 2020-03-29 03:11

The way how the new xmlns.jcp.org XML namespaces are been handled is broken in the first Mojarra releases 2.2.0 and 2.2.1. Among others, they overlooked to properly register the new JSF 2.2 components/tags/attributes/handlers. It has been fixed in Mojarra 2.2.2 as per issue 2900 (note: issue ticket describes different problem symptom, but under the covers, it's essentially the same cause).

So, upgrading to at least Mojarra 2.2.2 should fix your problem. It's currently already at 2.2.5.

查看更多
登录 后发表回答