java – 在WildFly中部署Web服务时无法获得WSDL协定错误

我正在尝试在WildFly服务器中部署我的Web服务,但我得到以下异常:

6:44:06,265 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."MyService.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyService.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "MyService.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)Caused by: org.jboss.wsf.spi.WSFException: JBWS024109: Could not get WSDL contract for endpoint com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationPortImpl at /wsdls/wsc11/wstx-wscoor-1.1-wsdl-200702.wsdl
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.getWsdlLocationURL(MetadataBuilder.java:283)
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:90)
at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:42)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more

我该如何解决上述问题?

解决方法:

如果有人有同样的错误,我在我的pom.xml中编译了下面的编译范围依赖项.删除依赖项后,项目已部署并运行良好.

<dependency>
    <groupId>org.glassfish.metro</groupId>
    <artifactId>webservices-rt</artifactId>
    <version>2.3</version>
    <scope>compile</scope>
</dependency>
上一篇:java – 将请求范围数据传递给CDI中的异步方法


下一篇:java – Spring eureka仪表板在wildfly上返回XML