JSF1005: Cannot instantiate validator of type javax.faces.Bean

本秂侑毒 提交于 2019-12-24 09:59:57

问题


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?


回答1:


Your webapp's runtime classpath is dirty.

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.

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>.



来源:https://stackoverflow.com/questions/8620671/jsf1005-cannot-instantiate-validator-of-type-javax-faces-bean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!