【问题标题】:java.lang.NoClassDefFoundError: javax/faces/FacesWrapper error though the required classes been added to the project classpath in RichFacesjava.lang.NoClassDefFoundError: javax/faces/FacesWrapper 错误,尽管所需的类已添加到 RichFaces 中的项目类路径中
【发布时间】:2012-04-02 07:45:33
【问题描述】:

在学习RichFaces的过程中,我将相关的.jar文件和jsf的.jar文件添加到WEBINF/lib和eclipse中的classpath中。

以下是我添加到WEBINF/lib中的文件,

richfaces-components-api-4.2.0.Final.jar
richfaces-components-ui-4.2.0.Final.jar
richfaces-core-api-4.2.0.Final.jar
richfaces-core-impl-4.2.0.Final.jar
sac-1.3.jar
javax.faces.jar
guava-11.0.2.jar
cssparser-0.9.5.jar
commons-logging-api-1.1.1.jar
commons-logging-adapters-1.1.1.jar
commons-logging-1.1.1.jar
commons-digester3-3.2.jar
commons-collections-3.2.1.jar
commons-beanutils-core-1.8.3.jar
commons-beanutils-bean-collections-1.8.3.jar
commons-beanutils-1.8.3.jar
common-annotations.jar

但是当我启动tomcat时它显示,

java.lang.NoClassDefFoundError: javax/faces/FacesWrapper

我发现类文件存在于 javax.faces.jar 文件中。我还将文件添加到项目类路径中。

但我仍然收到上述错误。

我是否缺少任何额外的 .jar 文件?还是我做错了文件集成?

谢谢

【问题讨论】:

  • 您的目标/部署到哪个服务器?顺便说一句,只需将文件放入/WEB-INF/lib 就足够了。你真的不需要摆弄构建路径设置。也许你让事情变得更糟,所以我建议撤消你在构建路径设置中所做的任何更改。
  • @BalusC - 感谢您的回答。出色地。我不知道为什么会这样。所以刚开始一个新项目并设置项目,它正在工作

标签: jsf richfaces


【解决方案1】:

尝试在你的 tomcat lib 文件夹中添加 javax.faces.jar

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-04
    • 2023-02-23
    • 2012-05-28
    • 2014-10-13
    • 1970-01-01
    • 1970-01-01
    • 2018-07-13
    • 2018-06-06
    相关资源
    最近更新 更多