<?xml version="1.0" encoding="ISO-8859-1"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:s="http://niem.gov/niem/structures/2.0"
xmlns:nc="http://niem.gov/niem/niem-core/2.0"
targetNamespace="http://www.test.com"
>
<import namespace="http://niem.gov/niem/structures/2.0" schemaLocation="./niem/structures/2.0/structures.xsd"/>
<import namespace="http://niem.gov/niem/niem-core/2.0" schemaLocation="./niem/niem-core/2.0/niem-core.xsd"/>
<complexType name="TestType">
<complexContent>
<extension base="s:ComplexObjectType">
</extension>
</complexContent>
</complexType>
</schema>
[java] Exception in thread "main" javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions [java] No element mapping exists for "http://niem.gov/niem/structures/2.0":"Augmentation" [java] this problem is related to the following location: [java] at @javax.xml.bind.annotation.XmlElementDecl(scope=class javax.xml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=Augmentation, defaultValue=^@, substitutionHeadNamespace=http://niem.gov/niem/structures/2.0, namespace=http://niem.gov/niem/ansi-nist/2.0, name=ProtectionOrderAugmentation) [java] at public javax.xml.bind.JAXBElement gov.niem.niem.ansi_nist._2.ObjectFactory.createProtectionOrderAugmentation(gov.niem.niem.ansi_nist._2.ProtectionOrderAugmentationType) [java] at gov.niem.niem.ansi_nist._2.ObjectFactory [java] at protected java.util.List gov.niem.niem.ansi_nist._2.FingerprintPalmImagePositionType.palmPosition [java] at gov.niem.niem.ansi_nist._2.FingerprintPalmImagePositionType [java] at @javax.xml.bind.annotation.XmlSeeAlso(value=[class gov.niem.niem.ansi_nist._2.MajorCasePrintSegmentOffsetType, class gov.niem.niem.ansi_nist._2.FingerprintImageNISTQualityType, class gov.niem.niem.ansi_nist._2.FingerprintImageQualityType, class gov.niem.niem.ansi_nist._2.FingerprintImageMajorCasePrintType, class gov.niem.niem.ansi_nist._2.FingerprintPalmImagePositionType]) [java] at protected java.util.List gov.niem.niem.niem_core._2.FingerprintSetType.fingerprint [java] at gov.niem.niem.niem_core._2.FingerprintSetType [java] at protected java.util.List gov.niem.niem.niem_core._2.PersonType.personFingerprintSet [java] at gov.niem.niem.niem_core._2.PersonType [java] at protected java.util.List gov.niem.niem.niem_core._2.ContactInformationType.contactResponder [java] at gov.niem.niem.niem_core._2.ContactInformationType [java] at protected java.util.List gov.niem.niem.niem_core._2.LocationType.locationContactInformation [java] at gov.niem.niem.niem_core._2.LocationType [java] at protected java.util.List gov.niem.niem.niem_core._2.ImageType.imageLocation [java] at gov.niem.niem.niem_core._2.ImageType [java] at public javax.xml.bind.JAXBElement gov.niem.niem.niem_core._2.ObjectFactory.createImage(gov.niem.niem.niem_core._2.ImageType) [java] at gov.niem.niem.niem_core._2.ObjectFactory [java] at protected java.util.List gov.niem.niem.niem_core._2.ToothType.toothPosition [java] at gov.niem.niem.niem_core._2.ToothType [java] at @javax.xml.bind.annotation.XmlSeeAlso(value=[class com.test.TestType, class gov.niem.niem.niem_core._2.ToothType, class gov.niem.niem.niem_core._2.DateType, class gov.niem.niem.niem_core._2.LocationType, class gov.niem.niem.niem_core._2.EntityType, class gov.niem.niem.niem_core._2.BiometricType, class gov.niem.niem.niem_core._2.IdentificationType, class gov.niem.niem.niem_core._2.LocaleType, class gov.niem.niem.niem_core._2.OrganizationType, class gov.niem.niem.niem_core._2.ObligationType, class gov.niem.niem.niem_core._2.DNALocusType, class gov.niem.niem.niem_core._2.PropertyType, class gov.niem.niem.niem_core._2.RelativeLocationType, class gov.niem.niem.niem_core._2.PersonNameType, class gov.niem.niem.niem_core._2.ObligationExemptionType, class gov.niem.niem.niem_core._2.MeasureRangeValueType, class gov.niem.niem.niem_core._2.FacilityType, class gov.niem.niem.niem_core._2.ItemValueType, class gov.niem.niem.niem_core._2.TelephoneNumberType, class gov.niem.niem.niem_core._2.AddressType, class gov.niem.niem.niem_core._2.MapLocationType, class gov.niem.niem.niem_core._2.TwoDimensionalGeographicCoordinateType, class gov.niem.niem.niem_core._2.PersonLanguageType, class gov.niem.niem.niem_core._2.ContactInformationType, class gov.niem.niem.niem_core._2.PersonType, class gov.niem.niem.niem_core._2.PassportType, class gov.niem.niem.niem_core._2.LatitudeCoordinateType, class gov.niem.niem.niem_core._2.MedicalConditionType, class gov.niem.niem.niem_core._2.DocumentType, class gov.niem.niem.niem_core._2.SupervisionType, class gov.niem.niem.niem_core._2.InjuryType, class gov.niem.niem.niem_core._2.HighwayType, class gov.niem.niem.niem_core._2.InternationalTelephoneNumberType, class gov.niem.niem.niem_core._2.ItemTitleType, class gov.niem.niem.niem_core._2.DNAType, class gov.niem.niem.niem_core._2.JurisdictionType, class gov.niem.niem.niem_core._2.LesseeType, class gov.niem.niem.niem_core._2.ScheduleDayType, class gov.niem.niem.niem_core._2.ClothingType, class gov.niem.niem.niem_core._2.CapabilityType, class gov.niem.niem.niem_core._2.WeaponType, class gov.niem.niem.niem_core._2.IntoxicationType, class gov.niem.niem.niem_core._2.AddressGridType, class gov.niem.niem.niem_core._2.EncounterClassificationType, class gov.niem.niem.niem_core._2.LienType, class gov.niem.niem.niem_core._2.DateRangeType, class gov.niem.niem.niem_core._2.UTMCoordinateType, class gov.niem.niem.niem_core._2.LongitudeCoordinateType, class gov.niem.niem.niem_core._2.VehicleBranderType, class gov.niem.niem.niem_core._2.AreaType, class gov.niem.niem.niem_core._2.DrivingRestrictionType, class gov.niem.niem.niem_core._2.DecalType, class gov.niem.niem.niem_core._2.LessorType, class gov.niem.niem.niem_core._2.CaseDispositionDecisionType, class gov.niem.niem.niem_core._2.EmailType, class gov.niem.niem.niem_core._2.StreetType, class gov.niem.niem.niem_core._2.FingerprintSetType, class gov.niem.niem.niem_core._2.ItemRegistrationType, class gov.niem.niem.niem_core._2.PhysicalFeatureType, class gov.niem.niem.niem_core._2.CircularRegionType, class gov.niem.niem.niem_core._2.NANPTelephoneNumberType, class gov.niem.niem.niem_core._2.InsuranceType, class gov.niem.niem.niem_core._2.StatusType, class gov.niem.niem.niem_core._2.FullTelephoneNumberType, class gov.niem.niem.niem_core._2.ContactRadioType, class gov.niem.niem.niem_core._2.DispositionType, class gov.niem.niem.niem_core._2.MeasureType, class gov.niem.niem.niem_core._2.StructuredAddressType, class gov.niem.niem.niem_core._2.KitType, class gov.niem.niem.niem_core._2.MilitarySummaryType, class gov.niem.niem.niem_core._2.LienHolderType, class gov.niem.niem.niem_core._2.AngularMeasureType, class gov.niem.niem.niem_core._2.VehicleBrandType, class gov.niem.niem.niem_core._2.InstantMessengerType, class gov.niem.niem.niem_core._2.DriverLicenseBaseType, class gov.niem.niem.niem_core._2.CrossStreetType, class gov.niem.niem.niem_core._2.ActivityType, class gov.niem.niem.niem_core._2.ItemType, class gov.niem.niem.niem_core._2.AssociationType, class gov.niem.niem.niem_core._2.IdentityType, class gov.niem.niem.ansi_nist._2.ImageQualityType, class gov.niem.niem.ansi_nist._2.TransactionType, class gov.niem.niem.ansi_nist._2.SignatureImageVectorType, class gov.niem.niem.ansi_nist._2.PhysicalFeatureSizeType, class gov.niem.niem.ansi_nist._2.FaceImageAttributeType, class gov.niem.niem.ansi_nist._2.PhysicalFeatureColorDetailType, class gov.niem.niem.ansi_nist._2.MinutiaType, class gov.niem.niem.ansi_nist._2.MinutiaeType, class gov.niem.niem.ansi_nist._2.OrganizationDocumentCountType, class gov.niem.niem.ansi_nist._2.TransactionCharacterSetDirectoryType, class gov.niem.niem.ansi_nist._2.SignatureImageVectorRepresentationType, class gov.niem.niem.ansi_nist._2.TransactionImageResolutionType, class gov.niem.niem.ansi_nist._2.FingerprintPatternType, class gov.niem.niem.ansi_nist._2.NISTStandardMinutiaeType, class gov.niem.niem.ansi_nist._2.FaceImageFeaturePointType, class gov.niem.niem.ansi_nist._2.PhysicalFeatureDescriptionType, class gov.niem.niem.ansi_nist._2.MinutiaeReadingSystemType, class gov.niem.niem.ansi_nist._2.MinutiaeFingerPositionType, class gov.niem.niem.ansi_nist._2.ImageCaptureType, class gov.niem.niem.ansi_nist._2.MinutiaeFingerPatternType, class gov.niem.niem.niem_core._2.BinaryType, class gov.niem.niem.ansi_nist._2.ContentRecordType, class gov.niem.niem.ansi_nist._2.MinutiaPositionType, class gov.niem.niem.ansi_nist._2.TransactionContentSummaryType, class gov.niem.niem.ansi_nist._2.TransactionDomainType, class gov.niem.niem.ansi_nist._2.RecordType, class gov.niem.niem.ansi_nist._2.PoseAngleType, class gov.niem.niem.ansi_nist._2.IdentificationRangeType, class gov.niem.niem.ansi_nist._2.FingerprintType]) [java] at com.test.TestType [java] at public com.test.TestType com.test.ObjectFactory.createTestType() [java] at com.test.ObjectFactory [java] No element mapping exists for "http://niem.gov/niem/structures/2.0":"Augmentation" [java] this problem is related to the following location: [java] at @javax.xml.bind.annotation.XmlElementDecl(scope=class javax.xml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=Augmentation, defaultValue=^@, substitutionHeadNamespace=http://niem.gov/niem/structures/2.0, namespace=http://niem.gov/niem/ansi-nist/2.0, name=ActivityAugmentation) [java] at public javax.xml.bind.JAXBElement gov.niem.niem.ansi_nist._2.ObjectFactory.createActivityAugmentation(gov.niem.niem.ansi_nist._2.ActivityAugmentationType) [java] at gov.niem.niem.ansi_nist._2.ObjectFactory [java] at protected java.util.List gov.niem.niem.ansi_nist._2.FingerprintPalmImagePositionType.palmPosition [java] at gov.niem.niem.ansi_nist._2.FingerprintPalmImagePositionType [java] at @javax.xml.bind.annotation.XmlSeeAlso(value=[class gov.niem.niem.ansi_nist._2.MajorCasePrintSegmentOffsetType, class gov.niem.niem.ansi_nist._2.FingerprintImageNISTQualityType, class gov.niem.niem.ansi_nist._2.FingerprintImageQualityType, class gov.niem.niem.ansi_nist._2.FingerprintImageMajorCasePrintType, class gov.niem.niem.ansi_nist._2.FingerprintPalmImagePositionType]) [java] at protected java.util.List gov.niem.niem.niem_core._2.FingerprintSetType.fingerprint [java] at gov.niem.niem.niem_core._2.FingerprintSetType [java] at protected java.util.List gov.niem.niem.niem_core._2.PersonType.personFingerprintSet [java] at gov.niem.niem.niem_core._2.PersonType [java] at protected java.util.List gov.niem.niem.niem_core._2.ContactInformationType.contactResponder [java] at gov.niem.niem.niem_core._2.ContactInformationType [java] at protected java.util.List gov.niem.niem.niem_core._2.LocationType.locationContactInformation [java] at gov.niem.niem.niem_core._2.LocationType [java] at protected java.util.List gov.niem.niem.niem_core._2.ImageType.imageLocation [java] at gov.niem.niem.niem_core._2.ImageType [java] at public javax.xml.bind.JAXBElement gov.niem.niem.niem_core._2.ObjectFactory.createImage(gov.niem.niem.niem_core._2.ImageType) [java] at gov.niem.niem.niem_core._2.ObjectFactory [java] at protected java.util.List gov.niem.niem.niem_core._2.ToothType.toothPosition [java] at gov.niem.niem.niem_core._2.ToothType [java] at @javax.xml.bind.annotation.XmlSeeAlso(value=[class com.test.TestType, class gov.niem.niem.niem_core._2.ToothType, class gov.niem.niem.niem_core._2.DateType, class gov.niem.niem.niem_core._2.LocationType, class gov.niem.niem.niem_core._2.EntityType, class gov.niem.niem.niem_core._2.BiometricType, class gov.niem.niem.niem_core._2.IdentificationType, class gov.niem.niem.niem_core._2.LocaleType, class gov.niem.niem.niem_core._2.OrganizationType, class gov.niem.niem.niem_core._2.ObligationType, class gov.niem.niem.niem_core._2.DNALocusType, class gov.niem.niem.niem_core._2.PropertyType, class gov.niem.niem.niem_core._2.RelativeLocationType, class gov.niem.niem.niem_core._2.PersonNameType, class gov.niem.niem.niem_core._2.ObligationExemptionType, class gov.niem.niem.niem_core._2.MeasureRangeValueType, class gov.niem.niem.niem_core._2.FacilityType, class gov.niem.niem.niem_core._2.ItemValueType, class gov.niem.niem.niem_core._2.TelephoneNumberType, class gov.niem.niem.niem_core._2.AddressType, class gov.niem.niem.niem_core._2.MapLocationType, class gov.niem.niem.niem_core._2.TwoDimensionalGeographicCoordinateType, class gov.niem.niem.niem_core._2.PersonLanguageType, class gov.niem.niem.niem_core._2.ContactInformationType, class gov.niem.niem.niem_core._2.PersonType, class gov.niem.niem.niem_core._2.PassportType, class gov.niem.niem.niem_core._2.LatitudeCoordinateType, class gov.niem.niem.niem_core._2.MedicalConditionType, class gov.niem.niem.niem_core._2.DocumentType, class gov.niem.niem.niem_core._2.SupervisionType, class gov.niem.niem.niem_core._2.InjuryType, class gov.niem.niem.niem_core._2.HighwayType, class gov.niem.niem.niem_core._2.InternationalTelephoneNumberType, class gov.niem.niem.niem_core._2.ItemTitleType, class gov.niem.niem.niem_core._2.DNAType, class gov.niem.niem.niem_core._2.JurisdictionType, class gov.niem.niem.niem_core._2.LesseeType, class gov.niem.niem.niem_core._2.ScheduleDayType, class gov.niem.niem.niem_core._2.ClothingType, class gov.niem.niem.niem_core._2.CapabilityType, class gov.niem.niem.niem_core._2.WeaponType, class gov.niem.niem.niem_core._2.IntoxicationType, class gov.niem.niem.niem_core._2.AddressGridType, class gov.niem.niem.niem_core._2.EncounterClassificationType, class gov.niem.niem.niem_core._2.LienType, class gov.niem.niem.niem_core._2.DateRangeType, class gov.niem.niem.niem_core._2.UTMCoordinateType, class gov.niem.niem.niem_core._2.LongitudeCoordinateType, class gov.niem.niem.niem_core._2.VehicleBranderType, class gov.niem.niem.niem_core._2.AreaType, class gov.niem.niem.niem_core._2.DrivingRestrictionType, class gov.niem.niem.niem_core._2.DecalType, class gov.niem.niem.niem_core._2.LessorType, class gov.niem.niem.niem_core._2.CaseDispositionDecisionType, class gov.niem.niem.niem_core._2.EmailType, class gov.niem.niem.niem_core._2.StreetType, class gov.niem.niem.niem_core._2.FingerprintSetType, class gov.niem.niem.niem_core._2.ItemRegistrationType, class gov.niem.niem.niem_core._2.PhysicalFeatureType, class gov.niem.niem.niem_core._2.CircularRegionType, class gov.niem.niem.niem_core._2.NANPTelephoneNumberType, class gov.niem.niem.niem_core._2.InsuranceType, class gov.niem.niem.niem_core._2.StatusType, class gov.niem.niem.niem_core._2.FullTelephoneNumberType, class gov.niem.niem.niem_core._2.ContactRadioType, class gov.niem.niem.niem_core._2.DispositionType, class gov.niem.niem.niem_core._2.MeasureType, class gov.niem.niem.niem_core._2.StructuredAddressType, class gov.niem.niem.niem_core._2.KitType, class gov.niem.niem.niem_core._2.MilitarySummaryType, class gov.niem.niem.niem_core._2.LienHolderType, class gov.niem.niem.niem_core._2.AngularMeasureType, class gov.niem.niem.niem_core._2.VehicleBrandType, class gov.niem.niem.niem_core._2.InstantMessengerType, class gov.niem.niem.niem_core._2.DriverLicenseBaseType, class gov.niem.niem.niem_core._2.CrossStreetType, class gov.niem.niem.niem_core._2.ActivityType, class gov.niem.niem.niem_core._2.ItemType, class gov.niem.niem.niem_core._2.AssociationType, class gov.niem.niem.niem_core._2.IdentityType, class gov.niem.niem.ansi_nist._2.ImageQualityType, class gov.niem.niem.ansi_nist._2.TransactionType, class gov.niem.niem.ansi_nist._2.SignatureImageVectorType, class gov.niem.niem.ansi_nist._2.PhysicalFeatureSizeType, class gov.niem.niem.ansi_nist._2.FaceImageAttributeType, class gov.niem.niem.ansi_nist._2.PhysicalFeatureColorDetailType, class gov.niem.niem.ansi_nist._2.MinutiaType, class gov.niem.niem.ansi_nist._2.MinutiaeType, class gov.niem.niem.ansi_nist._2.OrganizationDocumentCountType, class gov.niem.niem.ansi_nist._2.TransactionCharacterSetDirectoryType, class gov.niem.niem.ansi_nist._2.SignatureImageVectorRepresentationType, class gov.niem.niem.ansi_nist._2.TransactionImageResolutionType, class gov.niem.niem.ansi_nist._2.FingerprintPatternType, class gov.niem.niem.ansi_nist._2.NISTStandardMinutiaeType, class gov.niem.niem.ansi_nist._2.FaceImageFeaturePointType, class gov.niem.niem.ansi_nist._2.PhysicalFeatureDescriptionType, class gov.niem.niem.ansi_nist._2.MinutiaeReadingSystemType, class gov.niem.niem.ansi_nist._2.MinutiaeFingerPositionType, class gov.niem.niem.ansi_nist._2.ImageCaptureType, class gov.niem.niem.ansi_nist._2.MinutiaeFingerPatternType, class gov.niem.niem.niem_core._2.BinaryType, class gov.niem.niem.ansi_nist._2.ContentRecordType, class gov.niem.niem.ansi_nist._2.MinutiaPositionType, class gov.niem.niem.ansi_nist._2.TransactionContentSummaryType, class gov.niem.niem.ansi_nist._2.TransactionDomainType, class gov.niem.niem.ansi_nist._2.RecordType, class gov.niem.niem.ansi_nist._2.PoseAngleType, class gov.niem.niem.ansi_nist._2.IdentificationRangeType, class gov.niem.niem.ansi_nist._2.FingerprintType]) [java] at com.test.TestType [java] at public com.test.TestType com.test.ObjectFactory.createTestType() [java] at com.test.ObjectFactory
私は、原因が何であるかを把握しようと、今日間ました。 Augmentation
とAugmentationType
が./niem/niem-core/2.0/niem-core.xsd
JAXB
で宣言されているNIEMのXSDファイルは、ここで発見された:
JAXBContext jc = JAXBContext.newInstance("com.test");
:
- https://www.niem.gov/create-iepd/pages/production-releases.aspx
- http://release.niem.gov/niem/2.1/niem-2.1.zip
私Test.java
ファイルがこれに失敗します
私はjaxb実装のJDK6を使用し、java.net上にある最新のjaxb実装でそれを上書きしようとしました(そして、jre/lib/endorsedにapi jarを置いています)。
this old forum message from 2007が見つかりました。同様のエラーが発生しました。 このスレッドのxmlビットを見るには、browser-view-sourceを実行する必要があります。 私はこれについて、さまざまなバリエーションを試しました。これをniemスキーマのように調整しましたが、私はそれを理解できません。
これはjaxb xjcコンパイラのバグか、niemスキーマファイルのバグですか?
xjc -d src/java -b bindings.xml src/jaxb/test.xsd
bindings.xml
:
<jaxb:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.0"
>
<jaxb:globalBindings underscoreBinding="asCharInWord">
</jaxb:globalBindings>
</jaxb:bindings>