java.util.Map is an interface, and JAXB can't handle interfaces.
来源:互联网 发布:国外的神秘组织知乎 编辑:程序博客网 时间:2024/05/16 06:52
原理参考: http://blog.sina.com.cn/s/blog_adc54a3b0101cn3h.html
处理方式推荐:http://blog.csdn.net/kongxx/article/details/7544640
不推荐:http://jyao.iteye.com/blog/1213655
java.util.Map is an interface, and JAXB can't handle interfaces.
在webservice项目中,出现异常:
Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionExcep
仔细查看程序中 一段详细错误信息:
java.sql.Timestamp does not have a no-arg default constructor.
this problem is related to the following location:
at java.sql.Timestamp
at public java.sql.Timestamp
===============网上查看类似解决方法===========================
网上搜索结果为:
class路径里面只有1个asm和1个cglib-NODEP-2.1_3.JAR
准确得说cglib还是在看了willem得回帖后加上去得,唯一得asm-2.2.3.jar也来自cxf。
cxf的jar包出现问题~~
=======================================================
但是我的程序,之前是正常可以运行、部署 在接口中增加方法不存在jar包冲突导致问题出现
在根据apache官网资料和网上资料指示:apache开源CXF虽然比较小型的简单的的webservice开发,但是有些数据类型支持不好
在项目中使用Apache开源的Services Framework CXF来发布WebService,发布的接口的入参有些类型支持不是很好,比如Timestamp和Map。这个时候我们就需要编写一些适配来类型转换(Timestamp为例:类型转换Timestamp和String)
在Timestamp注解:@XmlJavaTypeAdapter(Timestamp适配对象.class)
Timestamp适配对象中:Timestamp转换为String类型输出,传入String时候,转换以Timestamp类型存入
同理Map也需要转换
0 0
- java.util.Map is an interface, and JAXB can't handle interfaces.
- 报错:java.util.Map is an interface, and JAXB can't handle interfaces.
- 报错:java.util.Map is an interface, and JAXB can't handle interfaces.
- JAXB 序列化 java.util.Map
- 关于运行期异常:Failed to instantiate [java.util.List]: Specified class is an interface
- 错误:Could not instantiate bean class [java.util.List]: Specified class is an interface
- 关于运行期异常:Failed to instantiate [java.util.List]: Specified class is an interface
- 关于运行期异常:Failed to instantiate [java.util.List]: Specified class is an interface
- 解决Failed to instantiate [java.util.List]: Specified class is an interface问题
- SpringMvc报错解决:Failed to instantiate [java.util.List]: Specified class is an interface
- Failed to instantiate [java.util.List]: Specified class is an interface
- 解决Failed to instantiate [java.util.List]: Specified class is an interface问题
- Could not instantiate bean class [java.util.List]: Specified class is an interface
- F1-Score "ValueError: Can't handle mix of binary and continuous"
- java.util.MissingResourceException: Can't find bundle for base name
- java.util.MissingResourceException: Can't find bundle for base name
- module rewrite_module is built-in and can't be loaded
- go []Type(数组) 无法直接转化为 []interface{}(can't I assign any slice to an []interface{})
- Black Box
- OpenCV2:图像的几何变换,平移、镜像、缩放、旋转(1)
- 类QQ,微信,联系人列表搜索UISearchBar使用
- 如何理解HTTP协议的“无连接,无状态”特点?
- WPF(C#)中Bitmap与BitmapImage相互转换
- java.util.Map is an interface, and JAXB can't handle interfaces.
- PopupWindow简单使用
- Android学习笔记——读取通讯录信息
- 南邮 OJ 1267 多元Huffman编码问题
- GdiplusFlat(6)绘制文本
- Android中Service(服务)详解
- 谈谈iOS中Categories(分类)、Extensions(类扩展)和继承的区别
- OpenCV2:图像的几何变换,平移、镜像、缩放、旋转(2)
- 机器学习算法基础概念学习总结