gpt4 book ai didi

java - ERROR : Property appears in @XmlType. propOrder,但不存在此类属性

转载 作者:数据小太阳 更新时间:2023-10-29 02:26:04 25 4
gpt4 key购买 nike

尝试使用 JAXB 编码时出现异常。

这是堆栈跟踪:

javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 10 counts of IllegalAnnotationExceptions
Property authentication appears in @XmlType.propOrder, but no such property exists. Maybe you meant authentication?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property key appears in @XmlType.propOrder, but no such property exists. Maybe you meant key?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypePrimitiveField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestPrimitiveField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property objectKey appears in @XmlType.propOrder, but no such property exists. Maybe you meant objectKey?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeObjectField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestObjectField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property objectsKey appears in @XmlType.propOrder, but no such property exists. Maybe you meant objectsKey?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeObjectsField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestObjectsField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property object appears in @XmlType.propOrder, but no such property exists. Maybe you meant object?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeObject
at protected com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeObject com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeObjectsField.objects
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeObjectsField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestObjectsField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property collectionsKey appears in @XmlType.propOrder, but no such property exists. Maybe you meant collectionsKey?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollectionsField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestCollectionsField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property collection appears in @XmlType.propOrder, but no such property exists. Maybe you meant collection?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollection
at protected com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollection com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollectionsField.collections
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollectionsField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestCollectionsField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property collectionKey appears in @XmlType.propOrder, but no such property exists. Maybe you meant collectionKey?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollectionField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollection.collection
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollection
at protected com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollection com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollectionsField.collections
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeCollectionsField
at protected java.util.List com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.requestCollectionsField
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property username appears in @XmlType.propOrder, but no such property exists. Maybe you meant username?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAuthentication
at protected com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAuthentication com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest.authentication
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSRequest com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSRequest()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory
Property errorCode appears in @XmlType.propOrder, but no such property exists. Maybe you meant errorCode?
this problem is related to the following location:
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSResponse
at public com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.TypeAorAgent2TTWSResponse com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory.createTypeAorAgent2TTWSResponse()
at com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects.ObjectFactory

TypeAorAgent2TTWSRequest.java

package com.alu.ipprd.aor310.ace.common.agt.jbpm.framework.tt.agt2tt.objects;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for type_aor_Agent2TTWS_Request complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="type_aor_Agent2TTWS_Request">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="authentication" type="{http://www.example.org/aor_Agent2TT_Interface}type_Authentication"/>
* &lt;element name="requestPrimitiveField" type="{http://www.example.org/aor_Agent2TT_Interface}type_PrimitiveField" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="requestObjectField" type="{http://www.example.org/aor_Agent2TT_Interface}type_ObjectField" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="requestObjectsField" type="{http://www.example.org/aor_Agent2TT_Interface}type_ObjectsField" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="requestCollectionsField" type="{http://www.example.org/aor_Agent2TT_Interface}type_CollectionsField" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "type_aor_Agent2TTWS_Request", propOrder = {
"authentication",
"requestPrimitiveField",
"requestObjectField",
"requestObjectsField",
"requestCollectionsField"
})
@XmlRootElement(name = "aor_Agent2TTWS_Request")
public class TypeAorAgent2TTWSRequest {

@XmlElement(required = true)
protected TypeAuthentication authentication;
protected List<TypePrimitiveField> requestPrimitiveField;
protected List<TypeObjectField> requestObjectField;
protected List<TypeObjectsField> requestObjectsField;
protected List<TypeCollectionsField> requestCollectionsField;

/**
* Gets the value of the authentication property.
*
* @return
* possible object is
* {@link TypeAuthentication }
*
*/
public TypeAuthentication getAuthentication() {
return authentication;
}

/**
* Sets the value of the authentication property.
*
* @param value
* allowed object is
* {@link TypeAuthentication }
*
*/
public void setAuthentication(TypeAuthentication value) {
this.authentication = value;
}

/**
* Gets the value of the requestPrimitiveField property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the requestPrimitiveField property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRequestPrimitiveField().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TypePrimitiveField }
*
*
*/
public List<TypePrimitiveField> getRequestPrimitiveField() {
if (requestPrimitiveField == null) {
requestPrimitiveField = new ArrayList<TypePrimitiveField>();
}
return this.requestPrimitiveField;
}

/**
* Gets the value of the requestObjectField property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the requestObjectField property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRequestObjectField().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TypeObjectField }
*
*
*/
public List<TypeObjectField> getRequestObjectField() {
if (requestObjectField == null) {
requestObjectField = new ArrayList<TypeObjectField>();
}
return this.requestObjectField;
}

/**
* Gets the value of the requestObjectsField property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the requestObjectsField property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRequestObjectsField().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TypeObjectsField }
*
*
*/
public List<TypeObjectsField> getRequestObjectsField() {
if (requestObjectsField == null) {
requestObjectsField = new ArrayList<TypeObjectsField>();
}
return this.requestObjectsField;
}

/**
* Gets the value of the requestCollectionsField property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the requestCollectionsField property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRequestCollectionsField().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TypeCollectionsField }
*
*
*/
public List<TypeCollectionsField> getRequestCollectionsField() {
if (requestCollectionsField == null) {
requestCollectionsField = new ArrayList<TypeCollectionsField>();
}
return this.requestCollectionsField;
}

}

我引用了下面的链接,仍然不知道到底是什么问题:

JAXB IllegalAnnotationExceptions

最佳答案

您在属性中错过了 @XmlElement

@XmlElement(required = true)
protected TypeAuthentication authentication;
@XmlElement
protected List<TypePrimitiveField> requestPrimitiveField;
@XmlElement
protected List<TypeObjectField> requestObjectField;
@XmlElement
protected List<TypeObjectsField> requestObjectsField;
@XmlElement
protected List<TypeCollectionsField> requestCollectionsField;

关于java - ERROR : Property appears in @XmlType. propOrder,但不存在此类属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33169452/

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