【问题标题】:Adding RICHFACES to existing JSF2 project将 RICHFACES 添加到现有的 JSF2 项目
【发布时间】:2011-08-24 16:21:06
【问题描述】:

我正在尝试使用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 需要哪些库..

【问题讨论】:

    标签: jsf jsf-2 richfaces


    【解决方案1】:

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

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

    一个。 sac-1.3, cssparser-0.9.5 - 组件 CSS 工作所必需的。

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

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

    • 它是可选的,仅当 RichFaces 组件将在您的应用操作/侦听器中动态创建/访问时才需要添加。

    d。 validation-api.jar 和任何像 hibernate-validators.jar 这样的实现

    • 它是可选的,如果您使用客户端或图形,则应添加 验证。仅当它不是由 a 提供时才应添加 服务器(Java EE 6 服务器)。

    您的异常表明您没有 Google Guava 库。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-18
      • 1970-01-01
      • 2023-03-15
      • 2020-12-22
      • 2013-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多