java - 两个类具有相同的 XML 类型名称……”
问题描述
获取 JAXB 异常,例如“两个类具有相同的 XML 类型名称......”
然而,这些是第 3 方库加上生成的 xml 被另一个应用程序使用,其中没有属性中不同注释的映射。
是否有另一种方法来解决这个问题?
java.lang.RuntimeException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Hay dos clases que tienen el mismo nombre de tipo XML "status". Utilice @XmlType.name y @XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at com.test.mx.PersonBO$Status
at public com.test.mx.PersonBO$Status com.test.mx.PersonBO.getPersonStatus()
at com.test.mx.PersonBO
at public com.test.mx.PersonBO com.test.mx.ReportHeaderTO.getPersonCreator()
at com.test.mx.ReportHeaderTO
at private com.test.mx.ReportHeaderTO com.test.mx.common.QueueXml.header
at com.test.mx.common.QueueXml
this problem is related to the following location:
at com.test.mx.ReportTO$Status
at public com.test.mx.ReportTO$Status com.test.mx.ReportHeaderTO.getStatus()
at com.test.mx.ReportHeaderTO
at private com.test.mx.ReportHeaderTO com.test.mx.common.QueueXml.header
at com.test.mx.common.QueueXml
解决方案
推荐阅读
- c# - 如何让函数返回两种不同类型的变量?
- c++ - SteamVR 覆盖控制器输入?
- javascript - 如何锁定范围组中的多个单元格,Excel - Web AddIns Office.js API
- c# - 通过 MEF 导入在子类中设置继承的属性
- amazon-web-services - 在私有子网中部署 lambda。创建 Lambda 函数时出错 (1):ValidationException 状态码:400,请求 id
- amazon-web-services - Aws 组织 - 将会员帐户移交给其他方
- javascript - 为什么不在 React 组件中使用全局变量
- r - 如何在 R markdown 中生成动态标题?
- java - 列表列表的元素为空,即使添加的项目不是
- python - django fileuploader 块方法没有按预期工作