Show Table of Contents
4.2.7. 调试和解决 JBoss Seam 调试页面的错误
在您移植和成功部署应用程序后,您可能遇到一个运行时错误,并重定向到 “JBoss Seam 调试页面”。这个页面的 URL 是 "http://localhost:8080/APPLICATION_CONTEXT/debug.seam"。这个页面允许您查看和检查和当前登陆会话关联的任何 Seam 上下文里的 Seam 组件。

图 4.1. JBoss Seam 调试页面
重定向到这个页面的最可能的原因是 Seam 已经捕获了应用程序里没有处理的异常。异常的根本原因常常可以在 "JBoss Seam 调试页面" 上的链接里找到。
- 展开页面上的
Component部分并查找org.jboss.seam.caughtException组件。 - 其原因和跟踪信息应该指向缺失的依赖关系。

图 4.2. 组件
org.jboss.seam.caughtException的信息 - 使用 第 4.2.2 节 “调试和解决 ClassNotFoundExceptions 和 NoClassDefFoundErrors” 里描述的技术来解决模块依赖关系。在上面的例子里,最简单的办法是添加
org.slf4j到MANIFEST.MF里。Manifest-Version: 1.0 Dependencies: org.slf4j
另一个选择是添加模块依赖关系到jboss-deployment-structure.xml文件:<jboss-deployment-structure> <deployment> <dependencies> <module name="org.slf4j" /> </dependencies> </deployment> </jboss-deployment-structure>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.