错误com.sun.xml.internal.bind.v2.runtime.IllegalAnno

博客内容描述了在Java应用中遇到的一个运行时异常,具体为com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException。该异常源于LC0003_ReqBodyBean类中有多个同名属性,如appid、appversion等,导致编译错误。博主提供了异常出现的位置,并提示可能的解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 6 counts of IllegalAnnotationExceptions
Class has two properties of the same name "appid"
 this problem is related to the following location:
  at public java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.getAppid()
  at com.msds.moserver.bean.LC0003_ReqBodyBean
 this problem is related to the following location:
  at protected java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.appid
  at com.msds.moserver.bean.LC0003_ReqBodyBean
Class has two properties of the same name "appversion"
 this problem is related to the following location:
  at public java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.getAppversion()
  at com.msds.moserver.bean.LC0003_ReqBodyBean
 this problem is related to the following location:
  at protected java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.appversion
  at com.msds.moserver.bean.LC0003_ReqBodyBean
Class has two properties of the same name "deviceid"
 this problem is related to the following location:
  at public java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.getDeviceid()
  at com.msds.moserver.bean.LC0003_ReqBodyBean
 this problem is related to the following location:
  at protected java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.deviceid
  at com.msds.moserver.bean.LC0003_ReqBodyBean
Class has two properties of the same name "devicemodel"
 this problem is related to the following location:
  at public java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.getDevicemodel()
  at com.msds.moserver.bean.LC0003_ReqBodyBean
 this problem is related to the following location:
  at protected java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.devicemodel
  at com.msds.moserver.bean.LC0003_ReqBodyBean
Class has two properties of the same name "osversion"
 this problem is related to the following location:
  at public java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.getOsversion()
  at com.msds.moserver.bean.LC0003_ReqBodyBean
 this problem is related to the following location:
  at protected java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.osversion
  at com.msds.moserver.bean.LC0003_ReqBodyBean
Class has two properties of the same name "outuserid"
 this problem is related to the following location:
  at public java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.getOutuserid()
  at com.msds.moserver.bean.LC0003_ReqBodyBean
 this problem is related to the following location:
  at protected java.lang.String com.msds.moserver.bean.LC0003_ReqBodyBean.outuserid
  at com.msds.moserver.bean.LC0003_ReqBodyBean

在对于的LC0003_ReqBodyBean实体类添加注解如图所示:

202520_4oPg_1584242.png

转载于:https://my.oschina.net/javazyw/blog/367341

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值