部署失败,jboss7中出现以下错误

时间:2013-12-18 12:49:35

标签: java eclipse jboss

18:06:01,551 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named ApplicationSecurityListener in deployment unit subdeployment "User.war" of deployment "User_EAR.ear" are as follows:

java:global/User_EAR/User/ApplicationSecurityListener!org.springframework.context.ApplicationListener
java:app/User/ApplicationSecurityListener!org.springframework.context.ApplicationListener
java:module/ApplicationSecurityListener!org.springframework.context.ApplicationListener
java:global/User_EAR/User/ApplicationSecurityListener
java:app/User/ApplicationSecurityListener
java:module/ApplicationSecurityListener

18:06:01,561 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service   jboss.deployment.subunit."User_EAR.ear"."User.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."User_EAR.ear"."User.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "User.war" of deployment "User_EAR.ear"
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.runWorker(Unknown Source) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed.  com.sun.jersey.api.core.servlet.WebAppResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig
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

18:06:01,797 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "User_EAR.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"User_EAR.ear\".\"User.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"User_EAR.ear\".\"User.war\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"User.war\" of deployment \"User_EAR.ear\""}}
18:06:43,435 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment User.war in 41635ms
18:06:43,436 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment User_EAR.ear in 41636ms
18:06:43,436 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."User_EAR.ear"."User.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."User_EAR.ear"."User.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "User.war" of deployment "User_EAR.ear"

2 个答案:

答案 0 :(得分:0)

您是否手动将Jersey捆绑在应用程序中? JBOSS AS7使用RestEasy进行JAX-RS实现

答案 1 :(得分:0)

使用此依赖项:

<dependency>
    <groupId>org.codehaus.enunciate</groupId>
    <!-- <artifactId>enunciate-rt</artifactId> jersey is included -->
    <artifactId>enunciate-jboss-rt</artifactId>
    <version>1.28</version>
</dependency>