gpt4 book ai didi

java - 在 JBOSS EAP 6.3 上部署 REST Webservice 时出错

转载 作者:行者123 更新时间:2023-11-29 10:13:27 32 4
gpt4 key购买 nike

我正在尝试在 jboss eap 6.3 服务器上部署一个 war(基于 Rest 的 Web 服务)文件。部署失败,跟踪如下。

我查看了所有依赖项,一切看起来都很好。

我错过了什么吗?

        11:22:57,659 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "RestService.war" (runtime-name: "RestService.war")
11:22:58,074 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,074 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,075 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,075 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,075 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,075 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,076 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,076 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,076 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,076 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceReader' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,077 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,077 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,077 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,077 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,077 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,078 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,078 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,078 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,078 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,079 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,079 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,083 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,084 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,086 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,088 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter' for service type 'javax.ws.rs.ext.MessageBodyWriter'
11:22:58,090 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeFromStringEnum' for service type 'com.sun.jersey.spi.StringReaderProvider'
11:22:58,091 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeValueOf' for service type 'com.sun.jersey.spi.StringReaderProvider'
11:22:58,092 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeFromString' for service type 'com.sun.jersey.spi.StringReaderProvider'
11:22:58,094 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$StringConstructor' for service type 'com.sun.jersey.spi.StringReaderProvider'
11:22:58,096 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$DateProvider' for service type 'com.sun.jersey.spi.StringReaderProvider'
11:22:58,097 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.JAXBStringReaderProviders$RootElementProvider' for service type 'com.sun.jersey.spi.StringReaderProvider'
11:22:58,134 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-10) MSC000001: Failed to start service jboss.deployment.unit."RestService.war".POST_MODULE: org.jboss.msc.service.StartException in service

jboss.deployment.unit."RestService.war".POST_MODULE: JBAS018733: Failed to process ph
ase POST_MODULE of deployment "RestService.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api
.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.DefaultResourceConfig
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:206)
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:104)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
... 5 more

11:22:58,156 ERROR [org.jboss.as.server] (HttpManagementService-threads - 5) JBAS015870: Deploy of deployment "RestService.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"RestService.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"RestService.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"RestService.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey
.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.DefaultResourceConfig"}}
11:22:58,168 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment RestService.war (runtime-name: RestService.war) in 12ms
11:22:58,168 INFO [org.jboss.as.controller] (HttpManagementService-threads - 5) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."RestService.war".POST_MODULE

最佳答案

我们看到这个错误是因为 jboss 的默认 jaxrs 实现是“Resteasy”。 http://www.jboss.org/resteasy .而您使用的是“ Jersey ”实现。您需要特别要求您的 jboss 中的 resteasy 部署程序不要扫描 resteasy 实现。这篇文章中提到了如何做 here .

关于java - 在 JBOSS EAP 6.3 上部署 REST Webservice 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25571668/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com