0
我遇到了一個我認爲與將JAXB更新爲最新版本相關的問題。我正在運行一個元帥命令,返回:使用解組函數時Matlab中的Java/JAXB錯誤
Java exception occurred:
javax.xml.bind.MarshalException
- with linked exception:
[java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String]
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(Unknown Source)
Caused by: java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.ArrayERProperty.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsXsiType(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsSoleContent(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(Unknown Source)
... 3 more
Caused by: java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
at javax.xml.bind.annotation.adapters.NormalizedStringAdapter.marshal(Unknown Source)
... 13 more
此代碼用於與Jaxb1一起使用,但現在返回此代碼。有任何想法嗎?