EclipseLink-25008:javax.xml.bind.UnmarshaleException
解组随机失败,错误如下 javax.xml.bind.UnmarshalException -除此之外: [Exception[EclipseLink-25008]Eclipse持久性服务-2.3.2.v20111125-r10461:org.Eclipse.Persistence.exceptions.xmlMarshallException 异常说明:在项目中找不到具有默认根元素DirectPaymentConfirmationRequest的描述符] XSD 您需要确保在引导JAXBContext时包含DirectPaymentConfirmationRequest类。如果您是从Java类引导,则可以执行以下操作:EclipseLink-25008:javax.xml.bind.UnmarshaleException,java,jaxb,eclipselink,Java,Jaxb,Eclipselink,解组随机失败,错误如下 javax.xml.bind.UnmarshalException -除此之外: [Exception[EclipseLink-25008]Eclipse持久性服务-2.3.2.v20111125-r10461:org.Eclipse.Persistence.exceptions.xmlMarshallException 异常说明:在项目中找不到具有默认根元素DirectPaymentConfirmationRequest的描述符] XSD 您需要确保在引导JAXBCon
JAXBContext jc = JAXBContext.newInstance(DirectPaymentConfirmationRequest.class);
如果生成了模型,则可以在生成的模型的包名上创建JAXBContext。实现具有该模型,并且在包名上创建JAXBContext,即-JAXBContext jc=JAXBContext.newInstancecom.transformer.generated,它是DirectPaymentConfirmationRequest类的包名
JAXBContext jc = JAXBContext.newInstance(DirectPaymentConfirmationRequest.class);