Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception occurred during code generation for the WSDL : java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList

I am using Tomcat 7 server and Axis 2 1.7 runtime in eclipse.

I have a WSDL file which is generated in Axis 2.

so go for Topdown approach to generate a webservice class (skeleton). I selected my configuration as Axis in server run time. when tried to click finish it is showing following error: "Exception occurred during code generation for the WSDL : java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList"

I thought it is a jar miss so i first included XmlSchema-1.4.2.jar the error hasn't resolved. so i deleted that jar and tried with latest jar downloaded from java2s (xmlschema-core-2.0.1.jar). Still i have the same problem.

Please help me to solve this issue.

This same issue also persist when trying to create a client from WSDl in eclipse.

Kindly help me to solve this with steps. Thanks

like image 303
Gowri Sundar Avatar asked Mar 04 '16 13:03

Gowri Sundar


2 Answers

Solved this issue: in webContent/WEB-INF/lib add xmlschema-core-2.2.1.jar; then, ensure it is added in Web App Libraries on your build path; finally close and reopen eclipse before generating web service client. This worked for me.

like image 178
johnny_kb Avatar answered Sep 19 '22 13:09

johnny_kb


In my case this error is occasioned for using axis2-1.7.3, my solution was change and use axis2-1.6.4

like image 41
David Hackro Avatar answered Sep 17 '22 13:09

David Hackro