Java webservice NoClassDefFoundError

一笑奈何 提交于 2019-12-12 01:33:54

问题


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

Can you please help me out :)


回答1:


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




回答2:


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>


来源:https://stackoverflow.com/questions/3489084/java-webservice-noclassdeffounderror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!