webservice发布小问题
发布时间:2020-12-16 23:37:31 所属栏目:安全 来源:网络整理
导读:Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptionsjava.util.List is an interface,and JAXB can't handle interfaces.this problem is re
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等。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |