【发布时间】:2012-09-06 07:46:47
【问题描述】:
我正在尝试将 Web 应用程序从 Richfaces 3.3.2 迁移到 4.0.0,因此我更改了 web.xml 文件中的必要内容(servlet 映射“.xhtml”并删除了 Ajax4jsf 过滤器)。 我还将richfaces 3 jar 更改为第4 版,但现在我遇到了一些错误,不知道如何解决它们:
The import org.ajax4jsf cannot be resolved
The import org.ajax4jsf cannot be resolved
The import org.ajax4jsf cannot be resolved
The import org.richfaces cannot be resolved
The import org.richfaces cannot be resolved
The import org.richfaces cannot be resolved
Incompatible conditional operand types UIComponent and UICalendar
UICalendar cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
Incompatible conditional operand types UIViewRoot and AjaxViewRoot
AjaxViewRoot cannot be resolved to a type
AjaxViewRoot cannot be resolved to a type
org.ajax4jsf cannot be resolved to a type
EventsQueue cannot be resolved to a type
HtmlAjaxSupport cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
Incompatible conditional operand types UIComponent and HtmlCalendar
HtmlCalendar cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
有人可以帮帮我吗?
【问题讨论】:
-
从 v3 迁移到 v4 相当混乱,很多事情都发生了变化。你的项目是用 Ant 还是 Maven 构建的?也许您在类路径中缺少一些库或错误的引用。您能否添加有关您的项目的更多详细信息?
-
问题是de迁移指南不完整。我的项目是在没有maven的情况下构建的。它适用于 v3 jar,所以我只是用 v4 jar 替换它们。(richfaces-api-4.0.0.Final.jar、richfaces-impl-4.0.0.Final.jar 和 richfaces-ui-4.0.0 .Final.jar)。
-
richfaces-ui-3.3.2.SR1.jar 可能会纠正这些错误。我想知道为什么 v4 不包含与 v3 相同的规范!
-
如果我没记错的话,一些图书馆的名字已经随着 v4 的变化而改变。试试 richfaces-components-ui
-
您的库中有richfaces-core-impl 吗? AjaxViewRoot 似乎在那里:docs.jboss.org/richfaces/4.0.X/4.0.0.Alpha2/en-US/javadocs/…