gpt4 book ai didi

java - Gradle:由 gradle bootJar 任务创建的 jar 不起作用

转载 作者:行者123 更新时间:2023-12-02 02:04:56 24 4
gpt4 key购买 nike

由 gradle 任务 bootJar 创建的 jar 不起作用。获取 javax.xml.bind.JAXBException。但使用 gradle bootRun 或通过 IDEA 一切正常

Caused by: javax.xml.bind.JAXBException: class com.xxx.PayOrderStatisticsGetRequest nor any of its super class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:593) ~[jaxb-impl-2.2.6.jar!/:2.2.6]
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:482) ~[jaxb-impl-2.2.6.jar!/:2.2.6]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323) ~[jaxb-impl-2.2.6.jar!/:2.2.6]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251) ~[jaxb-impl-2.2.6.jar!/:2.2.6]
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:95) ~[na:1.8.0_221]
at org.apache.axis2.datasource.jaxb.JAXBDSContext$1.run(JAXBDSContext.java:477) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axis2.datasource.jaxb.JAXBDSContext$1.run(JAXBDSContext.java:462) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:76) ~[axis2-kernel-1.7.9.jar!/:1.7.9]
at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshalByElement(JAXBDSContext.java:462) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshal(JAXBDSContext.java:422) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._outputFromBO(JAXBBlockImpl.java:175) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axis2.jaxws.message.impl.BlockImpl.outputTo(BlockImpl.java:371) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axis2.jaxws.message.impl.BlockImpl.serialize(BlockImpl.java:295) ~[axis2-jaxws-1.7.9.jar!/:1.7.9]
at org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer.serializePushOMDataSource(StAXSerializer.java:53) ~[axiom-dom-1.2.21.jar!/:na]
at org.apache.axiom.om.impl.common.serializer.push.Serializer.serialize(Serializer.java:293) ~[axiom-dom-1.2.21.jar!/:na]

最佳答案

@ApiModel(value = "PayOrderStatisticsGetRequest", description = "Запрос на получение сводки по количеству ПП на подпись и отправку")
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "")
@XmlRootElement(name = "PayOrderStatisticsGetRequest")
@XmlSeeAlso({PayOrderStatisticsGetRequest.class}) //add this and try
public class PayOrderStatisticsGetRequest { }

引用javax.xml.bind.JAXBException: Class *** nor any of its super class is known to this context

关于java - Gradle:由 gradle bootJar 任务创建的 jar 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57361582/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com