cxf websphere org/apache/ws/commons/schema/XmlSchemaCollection.read
使用cxf在本地tomcat发布webservice没有问题,到测试环境的websphere8上启动就报错。
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:388) 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:690) 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.ServerFactoryBean.create(ServerFactoryBean.java:159) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:454) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) ... 37 more
org.apache.ws.commons.schema.XmlSchemaCollection是在xmlschema-core-2.0.3.jar包里的。
把WebSphere配置的类加载器以父最后都不行。
原本以为XmlSchemaCollection和WebSphere自带的有冲突,删掉xmlschema-core-2.0.3.jar还是报同样的错误。
现在我还是觉得是WebSphere里自带了org.apache.ws.commons.schema.XmlSchemaCollection这个,要不然删掉我的xmlschema-core-2.0.3.jar为什么还是报这个错误呢?WebSphere里的jar这么多,如何找到啊,还 是其他原因导致的??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
引用来自“水瓶太初”的评论
这个问题和我遇到的一样,我已经解决。具体解决方案我已经写成文档保存在我的百度文库里面。文库地址:
http://wenku.baidu.com/view/da2a9373fad6195f302ba649.html
9
谢谢,我已经解决了,方案和你类似!
这个问题和我遇到的一样,我已经解决。具体解决方案我已经写成文档保存在我的百度文库里面。文库地址:
http://wenku.baidu.com/view/da2a9373fad6195f302ba649.html