Jboss 6我试图在服务器上部署restful Web服务但面临异常

时间:2014-09-12 12:05:14

标签: java rest jboss6.x

我正在尝试在jboss 6上部署restful web服务但是失败了。 例外情况如下。

Unexpected HTTP response: 500

Request
{
    "address" => [("deployment" => "copl.war")],
    "operation" => "deploy"
}

Response

Internal Server Error
{
    "outcome" => "failed",
    "failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"copl.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"copl.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"copl.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer from [Module \"deployment.copl.war:main\" from Service Module Loader]
    Caused by: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer from [Module \"deployment.copl.war:main\" from Service Module Loader]"}},
    "rolled-back" => true
}

1 个答案:

答案 0 :(得分:1)

缺少

com.sun.jersey.spi.container.servlet.ServletContainer 类。请找到包含此类的jar并将其添加到jboss6 standalone / lib / ext文件夹中。如果问题未修复,则将其添加到项目lib文件夹(运行时库)中。