在WildFly 10中部署CXF 3.1.7

时间:2016-11-18 13:37:57

标签: java cxf wildfly wildfly-10

我收到以下异常:

  

18:45:51,355 WARN [org.jboss.modules](MSC服务线程1-3)无法在模块“deployment.Sample”中定义类org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider。 war:main“来自Service Module Loader:java.lang.NoClassDefFoundError:无法链接org / apache / cxf / ws / security / sts / provider / SecurityTokenServiceProvider(来自Service Module Loader的模块”deployment.Sample.war:main“):的javax / XML / WS /提供商

日志:

18:45:51,365 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."Sample.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Sample.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "Sample.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: java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider (Module "deployment.Sample.war:main" from Service Module Loader): javax/xml/ws/Provider
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
        at org.jboss.modules.Module.loadModuleClass(Module.java:606)
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
        at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadClassInfoSet(ServletContainerInitializerDeploymentProcessor.java:259)
        at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:169)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
        ... 5 more

1 个答案:

答案 0 :(得分:0)

当解决与所报告的类似问题时,我发现此资源很有帮助。 https://developer.jboss.org/thread/268163 当我应用Reto Hodel(2017-03-07 09:56)的建议时,即“在jboss-deployment-structure.xml中添加两个模块依赖项:java.xml.ws.api(实际上包含提供者)接口)和javax.jws.api”,该问题已修复iself。