Java网络服务NoClassDefFoundError [英] Java webservice NoClassDefFoundError
问题描述
我正在使用Java生成此语句的Web服务
I am generating a webservice stubusing this statement in java
new TPFServiceStub(webserviceUrl);
我在8088的soap UI中创建了一个模拟服务. 我在webserviceUrl变量中传递的URL相同. 所有相关的jar都放置在axis_home中. 我收到以下错误消息.
I have created a mock service in soap UI at 8088. The same URL I am passing in the webserviceUrl variable. All the dependent jars are placed in axis_home. I am getting this following error.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axiom/om/OMDataSource
at com.arcot.csso.credchangereportsvc.dao.CIWebserviceDAO.getServiceObject
您能帮我一下吗:)
推荐答案
我猜想您用于实现WebService端点的库/框架使用Apache Axiom作为SOAP消息工厂.因此,您应该确保在您的类修补程序上有Axiom jar.
I'm guessing the library/framework you've been using to implement your WebService endpoints uses Apache Axiom as SOAP Message Factory. So, you should make sure you have Axiom jar on your classpatch.
您可以在此处获取Apache Axiom的最新二进制文件: http://ws.apache.org /axiom/download.cgi
You can get the latest binary for Apache Axiom here: http://ws.apache.org/axiom/download.cgi
如果您再次成为Maven的快乐用户,则可以将以下依赖项简单地添加到您的pom.xml
文件中:
In case you've been yet another happy user of Maven you can simpply add the following dependency to your pom.xml
file:
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom</artifactId>
<version>1.2.11</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
这篇关于Java网络服务NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!