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

Vinoth picture Vinoth · Mar 4, 2016 · Viewed 21.9k times · Source

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

Answer

johnny_kb picture johnny_kb · Apr 8, 2016

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.