我正在尝试使用jboss guide将richfaces添加到我的JSF 2项目中。我做了他们在第2.6点中说的话,但是在重新启动tomcat服务器之后,报告了HTTP状态404。

我错过了什么吗?

更新:
当我添加richfaces-components-ui-4.0.0.Final.jar和richfaces-core-impl-4.0.0.Final.jar并重新启动tomcat服务器时,它报告:

INFO: Unsanitized stacktrace from failed start...
com.sun.faces.config.ConfigurationException:
Source Document: jar:file:/D:/WORKSPACE/BC/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PORTAL/WEB-INF/lib/richfaces-core-impl-4.0.0.Final.jar!/META-INF/faces-config.xml
Cause: Unable to create a new instance of 'org.richfaces.resource.ResourceHandlerImpl': java.lang.reflect.InvocationTargetException
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:293)
....

13.5.2011 8:41:52 com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.google.common.base.Function
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:379)
....

13.5.2011 8:41:52 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.google.common.base.Function
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
....
13.5.2011 8:41:52 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
13.5.2011 8:41:52 org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/PORTAL] startup failed due to previous errors
13.5.2011 8:41:52 com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:894)
....

现在我不确定JSF2需要哪些库,RICHFACES需要哪些库。

最佳答案

根据RichFaces 4的readme.txt,需要以下JAR:



您的异常(exception)情况表明您没有Google Guava库。

关于jsf - 将RICHFACES添加到现有的JSF2项目,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5987933/

10-12 13:23