我正在尝试在JBOSS 8.2中部署CXF(启用MTOM)FileUpload服务。
所写的服务是在http://www.javatips.net/blog/2013/04/cxf-file-upload-with-soap-mtom
的帮助下完成的我知道JBoss 8.2已经在其modules文件夹中提供了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吗?如果是这样,如何装载特定的罐子。
任何其他解决此问题的指针也会有所帮助。
提前致谢
萨迪普
答案 0 :(得分:1)
尝试在MANIFEST.MF文件中添加cxf依赖项(在war的根文件夹的META-INF文件夹中)
Dependencies: org.apache.cxf.impl services