在Jboss AS 7上部署Jersey webapp [英] Deploying a Jersey webapp on Jboss AS 7

查看:197
本文介绍了在Jboss AS 7上部署Jersey webapp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前在Jboss AS 4/5上运行一些Web应用程序,我正在测试向jboss7的迁移.当我尝试在JBoss AS 7(带有独立预览配置文件的完整配置文件)上部署基于球衣的Web应用程序时,我得到:

Currently running some webapps on Jboss AS 4/5 and I am testing migration to jboss7. When I try to deploy a jersey based webapp on JBoss AS 7 (full profile with standalone-preview config file), I get:

org.jboss.as.server.deployment.DeploymentUnitProcessingException: Only one JAX-RS Application Class allowed.

我已经做了一些探索,发现RestEasy是嵌入到Application Server中的默认JAX-RS实现. http://community.jboss.org/message/579996

I've done a bit of hunting around on it and found that RestEasy is the default JAX-RS implementation embedded into Application Server. Posts like http://community.jboss.org/message/579996 and https://issues.jboss.org/browse/JBAS-8830) mention that the RestEasy deployer takes over.

在AS 6中,删除部署程序似乎更容易,而我还没有看到针对AS 7的任何解决方案.

In AS 6, it seems easier to remove the deployer whereas I have not seen any solutions for AS 7.

推荐答案

此帖子已经提到:

it has already been mentioned in this post : https://community.jboss.org/message/744530#744530 , you can just ask the resteasy module to not scan for other JAX RS implementations in your webapp; just add this to your web.xml :

<context-param>
    <param-name>resteasy.scan</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>resteasy.scan.providers</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>resteasy.scan.resources</param-name>
    <param-value>false</param-value>
</context-param>

对我来说很好

这篇关于在Jboss AS 7上部署Jersey webapp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆