为 WSDL 生成代码期间发生异常:java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList [英] Exception occurred during code generation for the WSDL : java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList

查看:50
本文介绍了为 WSDL 生成代码期间发生异常:java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse 中使用 Tomcat 7 服务器和 Axis 2 1.7 运行时.

我有一个在 Axis 2 中生成的 WSDL 文件.

所以采用自顶向下的方法来生成一个 web 服务类(骨架).我在服务器运行时选择了我的配置作为 Axis.当尝试单击完成时,它显示以下错误:在 WSDL 的代码生成期间发生异常:java.lang.NoClassDefFoundError:org/apache/ws/commons/schema/utils/NamespacePrefixList">

我认为这是一个 jar 未命中,所以我首先包含 XmlSchema-1.4.2.jar 错误尚未解决.所以我删除了那个 jar 并尝试使用从 java2s (xmlschema-core-2.0.1.jar) 下载的最新 jar.我仍然有同样的问题.

请帮我解决这个问题.

在 Eclipse 中尝试从 WSDl 创建客户端时,同样的问题也仍然存在.

请帮助我通过步骤解决此问题.谢谢

解决方案

解决了这个问题:在webContent/WEB-INF/lib中添加xmlschema-core-2.2.1.jar;然后,确保将其添加到您的构建路径上的 Web 应用程序库中;最后在生成 web 服务客户端之前关闭并重新打开 eclipse.这对我有用.

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

解决方案

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.

这篇关于为 WSDL 生成代码期间发生异常:java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆