JSF1005:无法实例化javax.faces.Bean类型的验证器 [英] JSF1005: Cannot instantiate validator of type javax.faces.Bean
问题描述
从JSF 1.2和RF 3.3迁移到JSF 2.1和RF 4之后,我在每个操作上都遇到错误.另外,我的CSS样式也不尽如人意.我认为我的CSS问题可能与此问题有关.
I am getting error below on every action after migrating from JSF 1.2 and RF 3.3 to JSF 2.1 and RF 4. Also my CSS styles is not as to be. I think my CSS problem can related to this issue.
23.Ara.2011 23:03:42 com.sun.faces.application.ApplicationImpl createValidator
SEVERE: JSF1005: Cannot instantiate validator of type javax.faces.Bean
我在网上搜索,但找不到任何解决方案.
I search on the net but couldn't find any solution.
这是怎么引起的,我该如何解决?
How is this caused and how can I solve it?
推荐答案
您的Web应用程序的运行时类路径很脏.
Your webapp's runtime classpath is dirty.
这是一个非常普遍的问题,如果没有Webapp部署中提供的所有库的完整概述,就不可能有一个合适的答案.我最好的猜测是您已将RichFaces源代码JAR文件放置在/WEB-INF/lib
中. RichFaces随附了用于二进制类和源代码的单独的JAR文件.您不应将RichFaces源代码JAR文件(文件名以-source
结尾的文件)放在类路径中.删除它们并保留二进制JAR文件.源代码JAR文件又包含几个启动脚本.它们不应执行两次.
This is a pretty generic problem which can not have a single suitable answer without having a complete overview of all libraries supplied in the webapp deploy. My best guess would be that you've placed RichFaces source code JAR files in /WEB-INF/lib
. RichFaces ships with separate JAR files for the binary classes and for the source code. You should not put RichFaces source code JAR files (the ones with a filename ending on -source
) in the classpath. Remove them and keep the binary JAR files. The source code JAR files contain in turn also several startup scripts. They should not be executed twice.
对于CSS问题,这可能无关紧要. RichFaces通过新的JSF2 <h:head>
组件加载CSS.确保在(主)模板中使用<h:head>
而不是<head>
.
As to the CSS problem, this is likely unrelated. RichFaces loads CSS through the new JSF2 <h:head>
component. Make sure that you have in your (master) template(s) a <h:head>
instead of <head>
.
这篇关于JSF1005:无法实例化javax.faces.Bean类型的验证器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!