webservice 异常Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read解决
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:133)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:192)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:95)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:380)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:474)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:685)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:536)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractServiceFactory.java:78)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.process(JavaToWSDLProcessor.java:101)
at org.apache.cxf.tools.java2ws.JavaToWSContainer.processWSDL(JavaToWSContainer.java:110)
at org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer.java:75)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:77)
at tool.wsdl.test.Java2WSDL.java2WSDL(Java2WSDL.java:53)
at tool.wsdl.test.Java2WSDL.main(Java2WSDL.java:61)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
是project包和moudle包冲突,新建个project试试
java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
请教王鹏博, 是缺少那个jar包呢? 非常感谢!
webservice 异常Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read解决 原因是因为缺少jar包 想问一下您,具体缺少那个包,谢谢!
原因是因为缺少jar包
xmlschema
升级到2.0.3版本应该就可以
楼主,我也遇到一模一样的问题,怎么解决的,跪求,在线等
问题已经解决!谢谢
楼上两个别空谈,如果是jar包,那你们也说说是哪些jar包冲突
恩 应该是XML解析器的版本问题
这个肯定是jar包版本问题