2012-05-21 95 views
1

docx4j(我的主機)通常與Sun/Oracle JAXB實現一起使用;以下感興趣的類是使用XJC生成的。MOXy XMLCompositeCollectionMapping描述符丟失

我想我會嘗試EclipseLink MOXY,看看它是如何去的。

上下文的init,我得到以下錯誤:

ERROR org.docx4j.jaxb.Context .<clinit> line 107 - Cannot initialize context 
javax.xml.bind.JAXBException: 
Descriptor Exceptions: 
--------------------------------------------------------- 

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException 
Exception Description: Descriptor is missing for class [org.docx4j.vml.spreadsheetDrawing.STCF]. 
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[moveWithCellsOrSizeWithCellsOrAnchor] 
Descriptor: XMLDescriptor(org.docx4j.vml.spreadsheetDrawing.CTClientData --> [DatabaseTable(ns15:ClientData)]) 

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException 
Exception Description: Descriptor is missing for class [org.docx4j.bibliography.STSourceType]. 
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[abbreviatedCaseNumberOrAlbumTitleOrAuthor] 
Descriptor: XMLDescriptor(org.docx4j.bibliography.CTSourceType --> []) 

Runtime Exceptions: 
--------------------------------------------------------- 

- with linked exception: 
[Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.IntegrityException 
Descriptor Exceptions: 
--------------------------------------------------------- 

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException 
Exception Description: Descriptor is missing for class [org.docx4j.vml.spreadsheetDrawing.STCF]. 
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[moveWithCellsOrSizeWithCellsOrAnchor] 
Descriptor: XMLDescriptor(org.docx4j.vml.spreadsheetDrawing.CTClientData --> [DatabaseTable(ns15:ClientData)]) 

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException 
Exception Description: Descriptor is missing for class [org.docx4j.bibliography.STSourceType]. 
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[abbreviatedCaseNumberOrAlbumTitleOrAuthor] 
Descriptor: XMLDescriptor(org.docx4j.bibliography.CTSourceType --> []) 

Runtime Exceptions: 
--------------------------------------------------------- 
] 
    at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:698) 
    at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:658) 
    at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:143) 
    at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:110) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at javax.xml.bind.ContextFinder.newInstance(Unknown Source) 
    at javax.xml.bind.ContextFinder.find(Unknown Source) 
    at javax.xml.bind.JAXBContext.newInstance(Unknown Source) 
    at javax.xml.bind.JAXBContext.newInstance(Unknown Source) 
    at org.docx4j.jaxb.Context.<clinit>(Context.java:79) 
    at org.docx4j.samples.OpenMainDocumentAndTraverse.<clinit>(OpenMainDocumentAndTraverse.java:52) 
Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.IntegrityException 
Descriptor Exceptions: 
--------------------------------------------------------- 

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException 
Exception Description: Descriptor is missing for class [org.docx4j.vml.spreadsheetDrawing.STCF]. 
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[moveWithCellsOrSizeWithCellsOrAnchor] 
Descriptor: XMLDescriptor(org.docx4j.vml.spreadsheetDrawing.CTClientData --> [DatabaseTable(ns15:ClientData)]) 

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException 
Exception Description: Descriptor is missing for class [org.docx4j.bibliography.STSourceType]. 
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[abbreviatedCaseNumberOrAlbumTitleOrAuthor] 
Descriptor: XMLDescriptor(org.docx4j.bibliography.CTSourceType --> []) 

Runtime Exceptions: 
--------------------------------------------------------- 

    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:535) 
    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:476) 
    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:435) 
    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:676) 
    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:634) 
    at org.eclipse.persistence.oxm.XMLContext$XMLContextState.<init>(XMLContext.java:830) 
    at org.eclipse.persistence.oxm.XMLContext$XMLContextState.<init>(XMLContext.java:770) 
    at org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java:177) 
    at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:726) 
    at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:696) 
    ... 13 more 

第一對被引用類,我們有一個枚舉STCFCTClientData

第二對被引用類,我們有另一個枚舉STSourceTypeCTSourceType

我該如何解決這個問題?

回答

1

備註:我是EclipseLink JAXB (MOXy)的領導者和JAXB (JSR-222)專家組的成員。

我已經能夠重新創建您所看到的問題。你所看到的問題是由於以下錯誤:

UPDATE

此問題已得到修復在2.3.3的EclipseLink 2.4.0和溪流。你可以下載一個包含從以下位置修復每晚構建:

+1

非常感謝您對布萊斯抽出時間來看待這個問題。 – JasonPlutext

+0

@JasonPlutext - 此問題現已在EclipseLink 2.3.3和2.4.0流中修復。您可以從以下位置下載帶有修復程序的每晚構建版本:http://www.eclipse.org/eclipselink/downloads/nightly.php –