微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

webservice发布小问题

Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.List is an interface,and JAXB can't handle interfaces.
	this problem is related to the following location:
		at java.util.List
java.util.List does not have a no-arg default constructor.
	this problem is related to the following location:
		at java.util.List

	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:124)
	... 11 more
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.List is an interface,and JAXB can't handle interfaces.
	this problem is related to the following location:
		at java.util.List
java.util.List does not have a no-arg default constructor.
	this problem is related to the following location:
		at java.util.List

在发布一个webservice的时候出现如上异常,在这里贴一下解决方法

原因:在做webServices复杂类型值传递时,返回值的类型不可以用接口类型。例如List应该改为ArrayList,Map改为HashMap等。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐