??【问题现象】使用JDK8或者少部分JDK7跑cxf项目时报此错误:
? ?超级程序员必须进的网站?辣眼睛的菲律宾美女
?
class="java">Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions java.util.Map is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at java.util.Map at private java.util.Map com.pn.common.webservice.api.jaxws_asm.GetActivityEgameRebateConfigListTotal.arg0 at com.pn.common.webservice.api.jaxws_asm.GetActivityEgameRebateConfigListTotal java.util.Map does not have a no-arg default constructor. this problem is related to the following location: at java.util.Map at private java.util.Map com.pn.common.webservice.api.jaxws_asm.GetActivityEgameRebateConfigListTotal.arg0 at com.pn.common.webservice.api.jaxws_asm.GetActivityEgameRebateConfigListTotal
?
【问题分析】
有的jdk版本中webService复杂类型值传递时,返回值的类型使用Map等接口如果不加特殊处理,则会报此错误。
?
【解决方案】未防止以后运维升级jdk版本或者开发升级jdk版本出现报错的现象,应将所有webservice接口api的方法Map参数或返回值前加上:
@XmlJavaTypeAdapter(MapAdapter.class
)
?
??超级程序员必须进的网站?
??辣眼睛的菲律宾美女真人游戏网站
??性感美女大片网