开发者

Java webservice NoClassDefFoundError

开发者 https://www.devze.com 2023-01-11 10:58 出处:网络
I am generating a webservice stubusing this statement in java new TPFServiceStub(webserviceUrl); I have created a mock service in soap UI at 8088.

I am generating a webservice stubusing this statement in java

 new TPFServiceStub(webserviceUrl);

I have created a mock service in soap UI at 8088. The same URL I am passing in the webserviceUrl v开发者_如何学Pythonariable. 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

Can you please help me out :)


You have the axiom jar containing the OMDataSource class in your deployment classpath?


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.

You can get the latest binary for Apache Axiom here: http://ws.apache.org/axiom/download.cgi

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消