写资料的网站有哪些,百度手机版网址,华军软件园下载中心,免费咨询法律问题的网站WebService专栏之xfire集成异常总览 文章目录一、asm.jar包冲突1.1 问题现象1.2 问题定位#xff1a;1.3 解决方案#xff1a;二、 Old 1.x singleton attribute in use2.1 问题现象2.2 问题定位2.3 解决方案#xff1a;三、Unrecognized xbean element mapping3.1 问题定位… WebService专栏之xfire集成异常总览 文章目录一、asm.jar包冲突1.1 问题现象1.2 问题定位1.3 解决方案二、 Old 1.x singleton attribute in use2.1 问题现象2.2 问题定位2.3 解决方案三、Unrecognized xbean element mapping3.1 问题定位3.2 解决方案四、services.xml it does not exist4.1 问题现象4.2 解决方案五、指定class默认缺省5.1 问题现象5.2 问题定位5.3 解决方案六 、解析依赖缺少6.1 问题现象6.2 问题定位6.3 解决方案七、发布服务失败7.1 问题现象7.2 解决方案一、asm.jar包冲突
1.1 问题现象
nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class
1.2 问题定位
org.springframework.asm-3.0.6.RELEASE.jar 这个jar已在spring中包含而且这个版本也不一致
1.3 解决方案
把org.springframework.asm-3.0.6.RELEASE.jar 在项目中删除
二、 Old 1.x ‘singleton’ attribute in use
2.1 问题现象
Configuration problem: Old 1.x ‘singleton’ attribute in use - upgrade to ‘scope’ declaration 注可以去下载xfire-spring-1.2.6的源码或者反编译问题主要是修改xml配置文档无需重新编译的。
2.2 问题定位
原因spring-4.*不支持singletonfalse或者singletontrue写法了。
2.3 解决方案
1.找到xfire-all-1.2.6.jar这个jar包2.用压缩工具打开找到org/codehaus/xfire/spring/xfire.xml文件3.编辑xfire.xml文件将singleton“true” 修改为 scope“singleton”4.把修改后的xfire-all-1.2.6.jar这个jar包放到lib文件夹中5.重启项目 注编辑xfire-all-1.2.6.jar要先复制到桌面上在用压缩工具打开进行编辑在项目中无法编辑的
三、Unrecognized xbean element mapping
问题3 org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean element mapping: beans in namespace http://xfire.codehaus.org/config/1.0
3.1 问题定位
Unrecognized xbean element mapping: beans in namespace http://xfire.codehaus.org/config/1.0
3.2 解决方案
修改services.xml文件. 原文件:
?xml version1.0 encodingUTF-8?
beans xmlnshttp://xfire.codehaus.org/config/1.0!-- 1. 暴露的服务名 2. 自定义命名空间 3. 接口路径 4. 接口实现类路径 --nameHelloService/namenamespaceCustomNamespaces/namespaceserviceClasscom.gblfy.xfire.service.IHelloService/serviceClassimplementationClasscom.gblfy.xfire.service.impl.HelloServiceImpl/implementationClass/service/beans修改后文件:
?xml version1.0 encodingUTF-8?
beansservice xmlnshttp://xfire.codehaus.org/config/1.0!-- 1. 暴露的服务名 2. 自定义命名空间 3. 接口路径 4. 接口实现类路径 --nameHelloService/namenamespaceCustomNamespaces/namespaceserviceClasscom.gblfy.xfire.service.IHelloService/serviceClassimplementationClasscom.gblfy.xfire.service.impl.HelloServiceImpl/implementationClass/service
/beans 四、services.xml it does not exist
4.1 问题现象
java.io.FileNotFoundException: class path resource [META-INF/xfire/services.xml] cannot be opened because it does not exist
4.2 解决方案
1.META-INF目录下面新建一个xfire文件夹2.把services.xml文件放到这个文件夹里3.再将整个META-INF拷贝到WEB-INF中4.clean一下工程5.重新加载后启动服务就可以了
五、指定class默认缺省
5.1 问题现象
cannot convert value of type ‘org.codehaus.xfire.spring.editors.ServiceFactoryEditor’ to …
5.2 问题定位
spring-4.*的customEditors获取类型直接指定为Class而配置默认还是缺省的
5.3 解决方案
1.找到xfire-all-1.2.6.jar这个jar包2.用压缩工具打开找到org/codehaus/xfire/spring/customEditors.xml 文件3.编辑customEditors.xml文件4.把修改后的xfire-all-1.2.6.jar这个jar包放到lib文件夹中5.重启项目
详细编辑customEditors.xml文件 把map中间的部分替换为下面即可。
entry keyorg.codehaus.xfire.service.ServiceFactory valueorg.codehaus.xfire.spring.editors.ServiceFactoryEditor/entry源文件
?xml version1.0 encodingUTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN http://www.springframework.org/dtd/spring-beans.dtdbeansbean idxfire.customEditorConfigurerclassorg.springframework.beans.factory.config.CustomEditorConfigurerproperty namecustomEditorsmapentry keyorg.codehaus.xfire.service.ServiceFactorybean classorg.codehaus.xfire.spring.editors.ServiceFactoryEditorproperty nametransportManager refxfire.transportManager //bean/entry/map/property/bean/beans修改后
?xml version1.0 encodingUTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN http://www.springframework.org/dtd/spring-beans.dtdbeansbean idxfire.customEditorConfigurerclassorg.springframework.beans.factory.config.CustomEditorConfigurerproperty namecustomEditorsmapentry keyorg.codehaus.xfire.service.ServiceFactory valueorg.codehaus.xfire.spring.editors.ServiceFactoryEditor/entry/map/property/bean/beans注编辑xfire-all-1.2.6.jar要先复制到桌面上在用压缩工具打开进行编辑在项目中无法编辑的
六 、解析依赖缺少
6.1 问题现象
nested exception is java.lang.NoClassDefFoundError: org/jdom/Content
6.2 问题定位
缺少jdom的jar包
6.3 解决方案
1.下载jdom-1.0.jar2.复制到项目中的lib包下面3.重启项目
jdom-1.0.jar下载链接
链接https://pan.baidu.com/s/1dpuCtD_Kng1rTaiF3dlM6g提取码bqfz
七、发布服务失败
7.1 问题现象
输入网址http://localhost:8081/XFireTest/services/HelloService?wsdl 浏览器会显示你所绑定的类或接口名称如 Available Services: MathService [wsdl] DelService [wsdl] Generated by XFire ( http://xfire.codehaus.org )
7.2 解决方案
1.重启服务2.换个浏览器试试