在测试我的代码时出现此错误,但我没有理解这到底是什么意思。
Exception [EclipseLink-44] (Eclipse Persistence Services - 2.6.1.v20150916-
55dc7c3): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Missing class indicator field from database row
[org.eclipse.persistence.internal.oxm.record.UnmarshalRecordImpl@3790cd99].
Descriptor: XMLDescriptor(com.myapp.msg.mypackage.MyDTO --> [])]
我看到了有关“ mox”,继承的一些相关主题。我认为这些不是我的情况。
这是我的MyDTO
代码:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MyDTO", propOrder = { "id" })
@XmlSeeAlso({ OtherOfMyDTOS_1.class, OtherOfMyDTOS_2.class })
public abstract class MyDTO implements Serializable {
private final static long serialVersionUID = 1L;
@XmlElement(name = "Id", required = true)
@NotNull
protected BigDecimal id;
...getter and setter
此元素由其他团队自动生成,我认为问题不在代码中。我正在阅读有关Java xml映射的信息,但是我不确定是什么会引发我得到的异常。
该对象将是Webservice的输入。也许映射不正确或不支持BigDecimal类型,但我不知道如何测试或调试这种情况。