将RICHFACES添加到现有的JSF2项目 [英] Adding RICHFACES to existing JSF2 project

查看:92
本文介绍了将RICHFACES添加到现有的JSF2项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此解决方案

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

除了RichFaces jar外,还需要一些依赖项才能正确配置框架.

a. sac-1.3cssparser-0.9.5-组件CSS工作所必需.

b. google-guava-r08-核心运行时依赖项.

c. annotations.jar-来自org.richfaces.cdk.

  • 它是可选的,仅当在应用程序操作/侦听器中动态创建/访问RichFaces组件时才需要添加.
d. validation-api.jar以及hibernate-validators.jar

之类的任何实现
  • 它是可选的,如果使用Client或Graph,则应添加 验证.仅应在未提供的情况下添加 服务器(Java EE 6服务器).

您的例外情况表明您没有Google Guava库.

I'm trying add richfaces to my JSF 2 project using this jboss guide. I've did what they say in point 2.6, but after restart my tomcat server, HTTP Status 404 is reported.

Have I missed something??

UPDATE: When I add richfaces-components-ui-4.0.0.Final.jar and richfaces-core-impl-4.0.0.Final.jar, and restart the tomcat server, it reports:

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

And now I'm not sure which libraries are neccessary for JSF2 and which for RICHFACES..

解决方案

According to readme.txt of RichFaces 4 the following JARs are required:

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

Your exception suggests that you don't have the Google Guava library.

这篇关于将RICHFACES添加到现有的JSF2项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆