引起:org.jboss.as.server.deployment.DeploymentUnitProcessingException:JBAS011232:只允许一个JAX-RS应用程序类

时间:2014-05-21 09:52:30

标签: java web-services java-ee jboss7.x resteasy

我正在尝试在JBoss上部署Web服务。这是一个JavaEE / ReasEasy / JPA webapp。我收到了这个错误:

11:43:12,136 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC00001: Failed to start service jboss.deployment.unit."print.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."print.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "print.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed.  com.project.PrintService com.project.PrintService
    at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:209)
    at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:105)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 5 more

11:43:12,144 INFO  [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "print.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"print.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"print.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"print.war\""}}
11:43:12,263 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-15) JBAS015877: Stopped deployment print.war in 119ms
11:43:12,264 INFO  [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.naming.context.java.module.print.print (missing) dependents: [service jboss.naming.context.java.module.print.print.Validator, service jboss.naming.context.java.module.print.print.ValidatorFactory] 
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."print.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."print.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "print.war"

[2014-05-21 11:43:12,570] Artifact printer-services-webapp:war: Error during artifact deployment. See server log for details.
[2014-05-21 11:43:12,622] Artifact printer-services-webapp:war: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"print.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"print.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"print.war\""}}

这是我的web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">
    <context-param>
        <param-name>resteasy.scan</param-name>
        <param-value>true</param-value>
    </context-param>
</web-app>

和PrintService

@ApplicationPath("/api")
public class PrintService extends Application {
}

如果您需要更多信息,请告知我们。

0 个答案:

没有答案