Show Table of Contents
4.2.6. 调试和解决 DuplicateServiceException
当您在 JBoss EAP 6 里部署 EAR 时,得到一个 JAR 子部署的 DuplicateServiceException 或显示 WAR 应用程序已经安装的消息,这可能是因为 JBossWS 处理部署的方式的改变而引起的。
JBossWS 3.3.0 对于基于端点的 servlet 引入了一个新的 Context Root 映射算法以允许它和 TCK6 无缝兼容。如果应用程序 EAR 归档包含具有相同名称的 WAR 和 JAR,JBossWS 可能会创建一个具有相同名字的 WAR 上下文和 web 上下文。Web 上下文和 WAR 上下文相冲突,这会导致部署错误。请用下列方法来解决部署问题:
- 将 JAR 文件重命名为与 WAR 不同的名称,这样生成的 Web 和 WAR 上下文就是唯一的。
- 在
jboss-web.xml文件里提供一个<context-root>元素。 - 在
jboss-webservices.xml文件里提供一个<context-root>元素。 - 在
application.xml文件为 WAR 自定义<context-root>元素。

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.