|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
troubleshoot JAXB "chameleon schema" ErrorsI am trying to use xjc from JAXB 2.1 to generate Java code for the HL7 CDA R2 format. Unfortunately, there appears to be errors in XML Schema files and so xjc fails with this exception.
The XML Schema files can be downloaded from http://xreg2.nist.gov/cda-validation/downloads/archives/HITSP_C37_TestPackage_03Jan_2008.zip, you can also get the Schema files in the attach file.There are total 7 Schema files, and their names are: LabCDA.xsd, LabPOCD_MT000040.xsd, TF_Vol3_Lab.xsd, datatypes.xsd, datatypes-base.xsd, NarrativeBlock.xsd and voc.xsd. The relationship of the Schema files are complex: LabCDA.xsd is the top level Schema and includes LabPOCD_MT000040.xsd; LabPOCD_MT000040.xsd incluedes datatypes.xsd, NarrativeBlock.xsd and voc.xsd and imports TF_Vol3_Lab.xsd; TF_Vol3_Lab.xsd incluedes datatypes.xsd; datatypes.xsd incluedes datatypes-base.xsd; datatypes-base.xsd includes voc.xsd; voc.xsd includes datatypes.xsd. The errors are as follows: [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.ANY" is already in use. Use a class customization to resolve this conflict. line 49 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) another "ANY" is generated from here. line 49 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called " chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo rums.java.net/jive/thread.jspa?threadID=18631 for more about this. line 49 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.AdxpPostBox" is already in use. Use a class custom ization to resolve this conflict. line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) another "AdxpPostBox" is generated from here. line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called " chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo rums.java.net/jive/thread.jspa?threadID=18631 for more about this. line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.ADXP" is already in use. Use a class customization to resolve this conflict. line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) another "ADXP" is generated from here. line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called " chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo rums.java.net/jive/thread.jspa?threadID=18631 for more about this. line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.AdxpDeliveryInstallationArea" is already in use. U se a class customization to resolve this conflict. line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) another "AdxpDeliveryInstallationArea" is generated from here. line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called " chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo rums.java.net/jive/thread.jspa?threadID=18631 for more about this. line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.EnFamily" is already in use. Use a class customiza tion to resolve this conflict. line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) another "EnFamily" is generated from here. line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called " chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo rums.java.net/jive/thread.jspa?threadID=18631 for more about this. line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1048 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1048 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 694 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes.xsd [ERROR] (Related to above error) This is the other declaration. line 694 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1055 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1055 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1034 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1034 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1309 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1309 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 892 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 892 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1607 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1607 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1089 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes.xsd [ERROR] (Related to above error) This is the other declaration. line 1089 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 80 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 80 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1812 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] (Related to above error) This is the other declaration. line 1812 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd [ERROR] Two declarations cause a collision in the ObjectFactory class. line 421 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd I have referred http://forums.java.net/jive/thread.jspa?messageID=278619 and http://forums.java.net/jive/thread.jspa?threadID=18631, and solved id problem, but Unfortunately I don't know how to deal with the errors above.So I am looking help at here. [Message sent by forum member 'wangxf_2000' (wangxf_2000)] http://forums.java.net/jive/thread.jspa?messageID=354583 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |