WebServices CXF开发常见异常及解决方法
2013-12-06 12:02
253 查看
2011-7-14 10:10:59 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
信息: Creating Service {http://services.ws.com/}IHelloServicesService from class com.ws.services.IHelloServices
Exception in thread "main" java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/Project/workspace/CxfServices/libs/jaxb-impl-2.2.1.1.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
原因:jdk1.6.0_02中的jaxws-api-2.0.jar及jaxb-api-2.0.jar,而cxf需要jaxws-api-2.1.jar及jaxb-api-2.1.jar的支持。
解决方法:1、将cxf所需的2.1的jar复制一份到jdk目录下的jre\lib\endorsed文件夹中。如果endorsed文件不存在,可新建。
2、我在开发使用jdk1.6.0_43解决问题
信息: Creating Service {http://services.ws.com/}IHelloServicesService from class com.ws.services.IHelloServices
Exception in thread "main" java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/Project/workspace/CxfServices/libs/jaxb-impl-2.2.1.1.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
原因:jdk1.6.0_02中的jaxws-api-2.0.jar及jaxb-api-2.0.jar,而cxf需要jaxws-api-2.1.jar及jaxb-api-2.1.jar的支持。
解决方法:1、将cxf所需的2.1的jar复制一份到jdk目录下的jre\lib\endorsed文件夹中。如果endorsed文件不存在,可新建。
2、我在开发使用jdk1.6.0_43解决问题
相关文章推荐
- WebServices CXF开发常见异常及解决方法
- WebServices CXF开发常见异常及解决方法
- Spring10种常见异常解决方法
- spring事务常见问题、异常分析和解决方法
- Android开发笔记——异常和错误及解决方法
- 2014-J2EE开发工作中遇到的异常问题及解决方法总结
- 普元EOS开发积累第一篇(常见错误解决方法) 持续更新
- ios开发常见错误及解决方法
- Android 开发之异常处理篇(一):SDK Manager 闪退的解决方法
- Spring10种常见异常解决方法
- 【Java开发常见问题解决】文本框表情emoji字符过滤处理方法
- 转:用ATL库开发COM组件常见的几个问题 (ie不响应事件,解决悲剧的方法)
- Struts常见异常信息和解决方法
- Android开发过程遇到异常含义及解决方法整理
- 关于在使用tomcat做开发测试的某些时候无端报ClassNotFound异常的解决方法
- Spring3.X <form:form>标签数据绑定常见异常解决方法
- Struts常见异常和解决方法
- Struts常见异常信息和解决方法
- WebServices生成发布过程及常见问题的解决方法
- Web应用开发过程中常见的几个中文问题及其解决方法