gpt4 book ai didi

java - 无法在 JBOSS 8.2 上部署 CXF 服务

转载 作者:行者123 更新时间:2023-12-01 10:43:48 26 4
gpt4 key购买 nike

我正在尝试在 JBOSS 8.2 中部署 CXF(启用 MTOM)FileUpload 服务。

编写的服务是在 http://www.javatips.net/blog/2013/04/cxf-file-upload-with-soap-mtom 的帮助下编写的

我知道 JBoss 8.2 的模块文件夹中已经包含了 CXF Jars(我可以找到它们),因此我不会将它们包含在部署的 war 文件中。

我的 web.xml 看起来像

<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>*</url-pattern>
</servlet-mapping>

尽管如此,我仍面临以下错误:

18:04:16,389 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-16) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./CloudReceiver.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./CloudReceiver.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet from [Module "deployment.CloudReceiver.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:933)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:256)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet from [Module "deployment.CloudReceiver.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:651)
... 6 more

Jboss 不加载“modules”文件夹中的所有 jar 吗?如果是这样,如何加载特定的 jar。

任何其他解决此问题的指针也会有所帮助。

提前致谢

苏迪普

最佳答案

尝试在 MANIFEST.MF 文件中添加 cxf 依赖项(在 war 根文件夹的 META-INF 文件夹内)

Dependencies:  org.apache.cxf.impl services

关于java - 无法在 JBOSS 8.2 上部署 CXF 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34312457/

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