gpt4 book ai didi

jsf - 将RICHFACES添加到现有的JSF2项目

转载 作者:行者123 更新时间:2023-12-04 13:54:41 25 4
gpt4 key购买 nike

我正在尝试使用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:

In addition to the RichFaces jars, a number of dependencies are required in order to properly configure the framework.

a. sac-1.3, cssparser-0.9.5 - required for components CSS work.

b. google-guava-r08 - core runtime dependency.

c. annotations.jar - from org.richfaces.cdk.

  • It's optional and only needs to be added if RichFaces components will be created/accessed dynamically in your apps actions/listeners.

d. validation-api.jar and any implementation like hibernate-validators.jar

  • It's optional and should be added if you using Client or Graph Validation. Should be added only if it's not provided by a server (Java EE 6 servers).


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

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com