月上千秋河
靜風流云之揮意舒達—殘賤
BlogJava
首頁
新隨筆
聯系
聚合
管理
隨筆-46 評論-54 文章-0 trackbacks-0
使用JAXB外部配置文件綁定schema文件
Illegal class inheritance loop.
使用JAXB 2.0以上版本,使用schema文件綁定Java對象,并配置了外部配置文件binding.xjb后,出現這個錯誤。
現已解決,如下:
1、schema文件po.xsd:
1
<?
xml version="1.0" encoding="utf-8"
?>
2
<
xs:schema
xmlns:xs
="http://www.w3.org/2001/XMLSchema"
elementFormDefault
="qualified"
attributeFormDefault
="unqualified"
>
3
<
xs:element
name
="AAAA"
>
4
<
xs:annotation
>
5
<
xs:documentation
>
Root
</
xs:documentation
>
6
</
xs:annotation
>
7
<
xs:complexType
>
8
<
xs:sequence
>
9
<
xs:element
name
="DDDD"
type
="xs:string"
default
="Hello!"
/>
10
<
xs:element
name
="VVVV"
type
="xs:integer"
default
="2008"
/>
11
<
xs:element
name
="SA"
minOccurs
="0"
>
12
<
xs:complexType
>
13
<
xs:sequence
>
14
<
xs:element
name
="BBBB"
type
="xs:string"
/>
15
<
xs:element
name
="CCCC"
type
="xs:string"
/>
16
<
xs:element
name
="TTTT"
type
="xs:dateTime"
minOccurs
="0"
/>
17
<
xs:element
name
="PPPP"
type
="xs:string"
minOccurs
="0"
/>
18
<
xs:element
name
="RRRR"
type
="xs:base64Binary"
/>
19
<
xs:element
name
="CACA"
maxOccurs
="unbounded"
>
20
<
xs:complexType
>
21
<
xs:sequence
>
22
<
xs:element
name
="CA"
type
="xs:base64Binary"
maxOccurs
="unbounded"
/>
23
<
xs:element
name
="CRCR"
minOccurs
="0"
/>
24
</
xs:sequence
>
25
</
xs:complexType
>
26
</
xs:element
>
27
</
xs:sequence
>
28
</
xs:complexType
>
29
</
xs:element
>
30
</
xs:sequence
>
31
</
xs:complexType
>
32
</
xs:element
>
33
</
xs:schema
>
2、外部配置文件binding.xjb:
1
<
jxb:bindings
version
="1.0"
2
xmlns:jxb
="http://java.sun.com/xml/ns/jaxb"
3
xmlns:xs
="http://www.w3.org/2001/XMLSchema"
>
4
<
jxb:bindings
schemaLocation
="po.xsd"
node
="/xs:schema"
>
5
<
jxb:globalBindings
6
fixedAttributeAsConstantProperty
="false"
7
collectionType
="java.util.Vector"
8
typesafeEnumBase
="xs:NCName"
9
choiceContentProperty
="false"
10
typesafeEnumMemberName
="generateError"
11
enableFailFastCheck
="false"
12
generateIsSetMethod
="false"
13
underscoreBinding
="asCharInWord"
/>
14
<
jxb:schemaBindings
>
15
<
jxb:package
name
="test.po"
>
16
<
jxb:javadoc
>
<![CDATA[
<body>Package level documentation for generated package primer.myPo.</body>
]]>
</
jxb:javadoc
>
17
</
jxb:package
>
18
<
jxb:nameXmlTransform
>
19
<
jxb:elementName
suffix
="Element"
/>
20
</
jxb:nameXmlTransform
>
21
</
jxb:schemaBindings
>
22
23
<
jxb:bindings
node
="http://xs:element[@name='AAAA']"
>
24
25
<
jxb:class
name
="Article"
>
26
<
jxb:javadoc
>
A
<
b>Purchase Order
<
/b> Article.
</
jxb:javadoc
>
27
</
jxb:class
>
28
29
<
jxb:bindings
node
=".//xs:element[@name='DDDD']"
>
30
<
jxb:property
name
="hi"
/>
31
</
jxb:bindings
>
32
33
<
jxb:bindings
node
=".//xs:element[@name='VVVV']"
>
34
<
jxb:property
name
="year"
/>
35
</
jxb:bindings
>
36
37
38
<
jxb:bindings
node
=".//xs:element[@name='SA']"
>
39
<
jxb:property
name
="content"
>
40
<
jxb:baseType
name
="Content"
/>
41
</
jxb:property
>
42
43
<
jxb:bindings
node
="./xs:complexType"
>
44
<
jxb:class
name
="Content"
/>
45
46
<
jxb:bindings
node
=".//xs:element[@name='BBBB']"
>
47
<
jxb:property
name
="title"
/>
48
</
jxb:bindings
>
49
50
<
jxb:bindings
node
=".//xs:element[@name='CCCC']"
>
51
<
jxb:property
name
="subTitle"
/>
52
</
jxb:bindings
>
53
54
<
jxb:bindings
node
=".//xs:element[@name='TTTT']"
>
55
<
jxb:property
name
="pubDate"
/>
56
</
jxb:bindings
>
57
58
<
jxb:bindings
node
=".//xs:element[@name='PPPP']"
>
59
<
jxb:property
name
="organize"
/>
60
</
jxb:bindings
>
61
62
<
jxb:bindings
node
=".//xs:element[@name='RRRR']"
>
63
<
jxb:property
name
="contentBinary"
/>
64
</
jxb:bindings
>
65
66
<
jxb:bindings
node
=".//xs:element[@name='CACA']"
>
67
<
jxb:property
name
="licence"
>
68
<
jxb:baseType
name
="Licence"
/>
69
</
jxb:property
>
70
71
<
jxb:bindings
node
="./xs:complexType"
>
72
<
jxb:class
name
="Licence"
/>
73
<
jxb:bindings
node
=".//xs:element[@name='CA']"
>
74
<
jxb:property
name
="licenceBinary"
/>
75
</
jxb:bindings
>
76
<
jxb:bindings
node
=".//xs:element[@name='CRCR']"
>
77
<
jxb:property
name
="licenceNo"
/>
78
</
jxb:bindings
>
79
</
jxb:bindings
>
80
</
jxb:bindings
>
81
</
jxb:bindings
>
82
83
</
jxb:bindings
>
84
85
</
jxb:bindings
>
86
87
88
</
jxb:bindings
>
89
</
jxb:bindings
>
3、運行:
1
xjc -b binding.xjb -d gen po.xsd
完畢!
posted on 2008-05-02 16:57
rox
閱讀(2592)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
<
2008年5月
>
日
一
二
三
四
五
六
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
常用鏈接
我的隨筆
我的評論
我的參與
最新評論
留言簿
(3)
給我留言
查看公開留言
查看私人留言
隨筆分類
(30)
AJAX(6)
DB(3)
hibernate(2)
Java(5)
JSTL(1)
Log(1)
Mysql(3)
Ruby(3)
tomcat(2)
新技術
雜想(4)
隨筆檔案
(47)
2016年5月 (1)
2013年7月 (2)
2012年7月 (1)
2010年12月 (1)
2010年4月 (1)
2010年2月 (1)
2010年1月 (1)
2009年12月 (1)
2009年11月 (1)
2009年9月 (1)
2009年7月 (2)
2009年6月 (1)
2009年1月 (1)
2008年12月 (2)
2008年6月 (3)
2008年5月 (3)
2008年4月 (1)
2007年12月 (1)
2007年2月 (1)
2007年1月 (1)
2006年11月 (2)
2006年9月 (1)
2006年8月 (2)
2006年7月 (1)
2006年6月 (1)
2006年4月 (2)
2006年3月 (2)
2006年2月 (4)
2006年1月 (1)
2005年10月 (1)
2005年8月 (3)
一些達人!
分享——知識與快樂 pragmatic programmer: programming for fun and money 不管是什么風,歡迎您的到來! 自我介紹 我現在上海某公司擔任軟件設計師,愛好軟件設計,架構和設計模式等。涉及EAI, ERP, SCM, DCM等。 歡迎批評建議,共尋合作機會,共創美好未來!
cnJava 的BLOG
又一個Java牛人!
Java Security高手,常常會出些題目。
Java Security 視野,平臺,戰略
JBoss Rules(Drools) 學習筆記
記錄學習JBoss Rules的點點滴滴
jini(99% jakarta)的 Blog
jini(99% jakarta)雅加達爪哇咖啡臺灣總店
SenTom,源自“盛唐”!
SenTom,源自“盛唐”,致力于Java開源項目在中國的推廣,以及文檔中文化! SenTom,非營利站點,只希望能為 Java Open Source 社區貢獻一點力量! 如果你愿意支持我們: 可以在你的網站為SenTom做一個連接; 可以向我們推薦你知道的Java開源項目; 可以向我們推薦你閱讀過的Java開源項目技術文章; 可以向我們提供你撰寫的Java開源項目技術文章; 聯系email:wayne@sentom.net
xheaven的專欄
又一個DB4O的達人!
一個Ruby達人
http://ruby-cn.org/的站長,翻譯了不少文檔了。 牛人一個。
東波'S BLOG
生活,學習,工作的一點看法,想法
利我博客
利我博客,達人,絕對的達人。
孤獨鍵盤手
BlogJava-xmatthew
干煸四季豆
給我一支煙,吞云吐霧間,讓所有煩累疲勞能夠過往如云煙~~~ 我的能力是協助團隊取得成功并盡快掌握新知識。
成都心情
成都心情 技術本身沒有優良,只有不良的設計和應用。 本 Blog 是從:http://blog.csdn.net/rosen 搬來。
陳剛的BLOG
子在川上曰 逝者如斯夫不舍晝夜
優秀個人
Java 愛好者
http://blog.matrix.org.cn/page/icess/與我聯系 資料收集的蠻多、蠻不錯。
操作系統版Flash作品
一起研究Flash! http://www.kingnare.com/blog/
狐貍的BLOG,關注用戶體驗和頁面前端開發..歡迎交流。。
自動截取字符長度添加省略號的一段js
優秀資源
Free Java Books
很多免費的Java Book的鏈接。
Java年鑒
大量的Java樣例代碼
Max On Java
ProGuard Java Optimizer and Obfuscator
好吃 - 美味工廠[懶人菜譜分享]
阿諾的美味工廠
愛百科,可信賴的中文百科全書,ipedia.org.cn
愛百科,可信賴的中文百科全書,內容豐富翔實的中國中文的百科全書,ipedia.org.cn
搜索
最新評論
1.?re: Java多層目錄打包和解壓代碼(apache commons compress, io, lang)[未登錄]
qwqw
--s
2.?re: js根據字符串樣式轉換成日期類型(javascript string to Date by pattern)
評論內容較長,點擊標題查看
--rox
3.?re: Grails結合Uploadify上傳文件的簡單代碼
@陳麗
謬夸了,只要能幫助到大家就好。
--rox
4.?re: Grails結合Uploadify上傳文件的簡單代碼
這是一篇很棒的帖子,在這篇文章的基礎傻姑娘進行修改和改進,完成了我想要的功能,真的很不錯
--陳麗
5.?re: wubi使用amd64.tar.xz安裝64位ubuntu
評論內容較長,點擊標題查看
--wellmv
閱讀排行榜
1.?js根據字符串樣式轉換成日期類型(javascript string to Date by pattern)(20158)
2.?Hibernate與Mysql使用c3p0連接池時的一點注意。(12506)
3.?JDK 1.5 文檔(chm版)(8608)
4.?Java解壓多重zip壓縮包 -- org.apache.commons.compress.archivers.zip.ZipFile結合ZipArchiveInputStream來實現(6665)
5.?wubi使用amd64.tar.xz安裝64位ubuntu(6543)
評論排行榜
1.?JDK 1.5 文檔(chm版)(10)
2.?How to set iframe height 100% or scrollable at out page?(5)
3.?Hibernate與Mysql使用c3p0連接池時的一點注意。(5)
4.?wubi使用amd64.tar.xz安裝64位ubuntu(4)
5.?開發者請注意oracle jdbc的resultSet.last()方法的效率問題【轉載】(4)
Powered by:
博客園
模板提供:
滬江博客
Copyright ©2025 rox
主站蜘蛛池模板:
国产成人精品亚洲日本在线
|
亚洲色成人网站WWW永久四虎
|
亚洲国产精品免费视频
|
亚洲AV无码1区2区久久
|
我想看一级毛片免费的
|
五月天婷婷精品免费视频
|
亚洲国产高清在线
|
99视频在线精品免费观看6
|
免费看一级毛片在线观看精品视频
|
亚洲成AV人片在线观看无
|
免费无码又爽又刺激高潮的视频
|
九九免费久久这里有精品23
|
亚洲女人影院想要爱
|
国产成人精品日本亚洲专区
|
丝袜足液精子免费视频
|
亚洲国产美女精品久久
|
国产av无码专区亚洲国产精品
|
日韩在线永久免费播放
|
国产成人亚洲精品无码AV大片
|
亚洲黄色三级网站
|
亚洲无码高清在线观看
|
亚洲人成电影网站免费
|
久久99毛片免费观看不卡
|
在线观看亚洲免费
|
亚洲理论片在线中文字幕
|
亚洲一区无码中文字幕
|
国产免费AV片无码永久免费
|
中文字幕免费在线看线人
|
九九热久久免费视频
|
亚洲av无码无线在线观看
|
亚洲小说图片视频
|
亚洲国产精品成人精品无码区
|
免费一看一级毛片人
|
成人毛片免费网站
|
成人免费视频网站www
|
日韩电影免费观看
|
成人无码视频97免费
|
免费人成在线观看播放a
|
亚洲人成色77777在线观看
|
亚洲国产夜色在线观看
|
亚洲男人的天堂在线播放
|