exception while using jackson and ormlite annotations together in one object

你说的曾经没有我的故事 提交于 2019-12-04 15:17:45
nutlike

Since ForeignCollection is an interface, Jackson cannot instantiate a new Object of that kind. I would try to either annotate the field with @JsonDeserialize(as=ConcreteSubclassOfForeignCollection.class), use a concrete subclass like BaseForeignCollection or use a simple list like in this solution: https://stackoverflow.com/a/14920916/2021412.

I have solved the issue by using Collection instead of ForeignCollection. Jackson can parse Collection now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!