久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

什么可能導(dǎo)致“JAXBElement 沒有無參數(shù)默認(rèn)構(gòu)造函

What might cause quot;JAXBElement Does not have a no-arg default constructorquot;?(什么可能導(dǎo)致“JAXBElement 沒有無參數(shù)默認(rèn)構(gòu)造函數(shù)?)
本文介紹了什么可能導(dǎo)致“JAXBElement 沒有無參數(shù)默認(rèn)構(gòu)造函數(shù)"?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在生成一個(gè)要放入商業(yè)軟件產(chǎn)品的 jar.該 jar 符合商業(yè)軟件的 api 并依賴于第二個(gè) jar,其中包含(除其他外)一組從 XSD 生成的 POJO.但是,當(dāng)我將它放入時(shí)嘗試實(shí)例化 JAXBContext 時(shí)它會(huì)失敗.

I'm generating a jar which is to be dropped into a commercial software product. That jar conforms to the commercial software's api and depends on a second jar, which contains (among other things) a set of POJOs generated from an XSD. However, it fails when trying to instantiate JAXBContext when I drop it in.

我明白了:

"1 counts of IllegalAnnotationExceptions"
javax.xml.bind.JAXBElement does not have a no-arg default constructor.
  this problem is related to the following location: 
    at javax.xml.bind.JAXBElement
    at mypackage.MyClass
    ...
    JAXBContext.newInstance("mypackage"); 
    ...

我的 XSD(為簡(jiǎn)潔起見)如下所示:

My XSD (summarized for brevity) looks like this:

<xsd:schema ... >
  <xsd:element name="MyClass" type="myType" />
  <xsd:complexType name="myType">
  ...
  </xsd:complextType>

</xsd:schema>

我認(rèn)為問題可能在于xsd:element"級(jí)別的類不存在,但即使我將 XJC 設(shè)置為創(chuàng)建 MyClass 并且我已驗(yàn)證 MyClass 有一個(gè)公共 no-,問題仍然存在arg 構(gòu)造函數(shù).

I thought perhaps that the issue was that Classes at the "xsd:element" level didn't exist, but the problem persists even when I set XJC up to create MyClass and I've verified that MyClass has a public no-arg constructor.

所以,我已經(jīng)查看了其他幾個(gè) SO 問題(事實(shí)上,在整個(gè)互聯(lián)網(wǎng)上).他們都沒有給我足夠的理解來解決這個(gè)問題,這可能只是對(duì)我的一個(gè)不好的反映.任何人都可以提供一些見解嗎?或者給我做其他測(cè)試來解決這個(gè)問題?

So, I've looked at several other SO questions (and all over the internet, in fact). None of them gave me enough understanding to solve this problem, which may just be a poor reflection on me. Can anybody shed some insight? Or give me alternative tests to conduct to break this down?

推薦答案

最終這個(gè)問題是由已修復(fù)的錯(cuò)誤引起的.我正在加載的系統(tǒng)使用庫(kù) JAXB-2.0,我認(rèn)為我使用的是最新版本 (JAXB-2.2.5).由于設(shè)計(jì)不佳的插件框架,我的版本被 2.0 jar 搶占了.

Ultimately this problem was caused by an error that has been fixed. The system I am loading into uses the library JAXB-2.0 where I thought I was using the latest version (JAXB-2.2.5). Thanks to a poorly designed plugin framework, my version was being pre-empted by the 2.0 jar.

為了解決這個(gè)問題,我必須升級(jí)商業(yè)軟件的庫(kù),或者嘗試使用 Classloaders

In order to get past this I'll have to either upgrade the library of the commercial software, or try and play with Classloaders

感謝所有幫助我找到這個(gè)的人.

Thanks to everyone who helped me to find this.

這篇關(guān)于什么可能導(dǎo)致“JAXBElement 沒有無參數(shù)默認(rèn)構(gòu)造函數(shù)"?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動(dòng)生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫(kù))
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對(duì)象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: sese视频在线观看 | 国产精品成人一区二区 | 国产精品久久久久久亚洲调教 | 国产亚洲精品久久午夜玫瑰园 | 天天干天天爽 | 欧美日韩在线一区二区三区 | 亚洲免费精品一区 | 欧美精品在线一区 | 日日摸夜夜添夜夜添精品视频 | 亚洲高清视频在线 | 亚洲精品小视频在线观看 | 99精品久久 | av网站免费观看 | 91网站在线看 | 天天澡天天操 | 国产高清视频一区 | 国产精品3区 | av毛片在线免费观看 | 日韩精品无码一区二区三区 | 日韩欧美国产精品一区二区三区 | 91在线影院 | 日韩av免费看 | 亚洲大片在线观看 | 成人午夜精品 | 人人九九精 | 成人亚洲片| 欧美精品一二区 | 中文字幕在线不卡 | 亚洲精品大全 | 在线观看日韩av | 日本特黄a级高清免费大片 特黄色一级毛片 | 99久久日韩精品免费热麻豆美女 | 色就是色欧美 | 亚洲精品日韩一区二区电影 | 国产视频在线观看一区二区三区 | 91香蕉嫩草 | 免费看av大片 | 成人一区二区在线 | 亚洲国产区 | 久久久精品影院 | 日韩午夜场 |