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

2

12

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

Icarus answered 4/3, 2016 at 13:48 Comment(3)
* I selected my configuration as Axis 2 in server runtime. sry its a Typo by mistake. Kindly help me with solutionsIcarus
I have the same issue: I also added xmlschema-core-2.2.1.jar in Web App Libraries but it doesn't work. Hope that someone will help us.Ethnocentrism
Try Axis2 1.6.X instead of Axis2 1.7.X.Irresolution
E
34

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.

Ethnocentrism answered 8/4, 2016 at 10:55 Comment(3)
Make sure you restart the eclipse - it didn't work for me until I did.Smutch
This solved my issue on Eclipse Neon. Should eclipse be notified so they fix this bug in the WTP project?Bithynia
This also worked for me. The only clarification would be that I had to drag and drop the xmlschema-core-2.2.1.jar into the webContent/WEB-INF/lib folder in Eclipse's project explorer. Just adding the xmlschema-core-2.2.1.jar as external library in the project's build path didn't work. Also, it's fundamental to restart Eclipse for the changes to take effect.Jaclynjaco
P
1

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

Pneumo answered 7/9, 2016 at 18:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.