java.lang.ClassNotFoundException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
java.lang.ClassNotFoundException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
我正在尝试实施 Primeface Exception Handler
我的面孔-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<!-- JSF and Spring are integrated -->
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
</application>
</faces-config>
当我在配置中添加 primefaces EL Resolver 和 factory 时,如下所示,我的 tomcat 启动失败。
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<!-- JSF and Spring are integrated -->
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver>
</application>
<factory>
<exception-handler-factory>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
</exception-handler-factory>
</factory>
</faces-config>
有更新吗?
------------编辑----------
我将 tomcat 版本从 7.0.42 更改为 7.0.64,它显示以下异常。
SEVERE: Critical error during deployment:
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.ExceptionHandlerFactory' was not configured properly.
Caused by: javax.faces.FacesException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
Caused by: java.lang.ClassNotFoundException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
异常详情请点击Exception Detail
所以解决方案是包含正确版本的 PrimeFaces (5.0),以前的版本不包含此 class。
我正在尝试实施 Primeface Exception Handler
我的面孔-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<!-- JSF and Spring are integrated -->
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
</application>
</faces-config>
当我在配置中添加 primefaces EL Resolver 和 factory 时,如下所示,我的 tomcat 启动失败。
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<!-- JSF and Spring are integrated -->
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver>
</application>
<factory>
<exception-handler-factory>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
</exception-handler-factory>
</factory>
</faces-config>
有更新吗?
------------编辑----------
我将 tomcat 版本从 7.0.42 更改为 7.0.64,它显示以下异常。
SEVERE: Critical error during deployment:
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.ExceptionHandlerFactory' was not configured properly.
Caused by: javax.faces.FacesException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
Caused by: java.lang.ClassNotFoundException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
异常详情请点击Exception Detail
所以解决方案是包含正确版本的 PrimeFaces (5.0),以前的版本不包含此 class。