webservice: Could not initialize Service NoSuchMethodException getPortClassMap()
来源:互联网 发布:机械绘图软件 编辑:程序博客网 时间:2024/05/20 08:24
今天用apache-cxf-3.1.1的wsdl2java生成webservice文件,调用的时候出了问题
报错:Could not initialize Service NoSuchMethodException getPortClassMap()
查资料找到类似的情况:http://bbs.csdn.net/topics/390736806?page=1#post-399531739
知道是因为创建 Service 的代理的时候没有使用 jdk 自带的 javax.xml.ws.spi.Provider,而是使用了 xfire 包中的 javax.xml.ws.spi.Provider
找到项目中的xfire-all-1.2.6.jar
删除之后,发现启动报错
于是,恢复jar包
删除xfire-all-1.2.6.jar 中org.codehaus.xfire.jaxws.Provider.class
本地启动没事,放服务器上报找不到类……
后来发现是因为jdk版本不同造成的。服务器上的jdk1.7的,怕引起其它麻烦就不想换。于是再找了找
最终把xfire-all-1.2.6.jar里META-INF/services 目录下的javax.xml.ws.spi.Provider
内容改成com.sun.xml.internal.ws.spi.ProviderImpl
重启服务器搞定
0 0
- webservice: Could not initialize Service NoSuchMethodException getPortClassMap()
- webservice: Could not initialize Service NoSuchMethodException getPortClassMap()
- java.lang.NoSuchMethodException: .getPortClassMap()
- xfire java.lang.IllegalStateException: Could not initialize Service
- xfire java.lang.IllegalStateException: Could not initialize Service
- xfire报错java.lang.IllegalStateException: Could not initialize Service.
- could not initialize proxy
- Could not initialize JavaVM
- could not initialize proxy
- could not initialize proxy
- could not initialize proxy
- could not initialize proxy
- could not initialize proxy
- could not initialize proxy
- could not initialize proxy
- could not initialize proxy
- oozie启动问题:Could not initialize service [org.apache.oozie.service.HadoopAccessorService]
- could not initialize :no session
- Android的FragmentTabHost使用总结(顶部或底部菜单栏)
- poj2485 Highways(最小生成树水题)
- 实验2 Activity和Intent-任务2:标准体重计算器
- 重叠区间个数
- 清理tomcat缓存的步骤
- webservice: Could not initialize Service NoSuchMethodException getPortClassMap()
- nginx的学习笔记
- Java枚举
- c经典编程实例
- linux命令 备忘
- React Native Button实现
- 【自考】数据结构导论——二叉树
- 算法 存一下
- 广义表的递归实现