This discussion is archived
1 2 Previous Next 21 Replies Latest reply: Feb 27, 2013 4:38 AM by odie_63 RSS

Error ORA-30937 at insert into XMLTYPE table

Martin1 Newbie
Currently Being Moderated
Hi,

i have registered via dbms_xmlschema.registerSchema a XSD schema which generated the appropriate db objects (object types and XMLTYPE table). With the following header and root element in the XML file the insert into the XMLTYPE table works fine:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  <PassAntrag xmlns:xsi="http://www.llv.li">
  ...
If the XML file has
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  <PassAntrag xmlns="http://www.llv.li">
  ...
then i get the following error at insert into the XMLTYPE table:
ORA-30937: Keine Schemadefinition für "PassAntrag" (Namespace "http://www.llv.li") in übergeordnetem Knoten "/"
ORA-06512: in Zeile 15
Here the XSD schema file:
<?xml version="1.0" encoding="UTF-8"?>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:element name="PassAntrag" type="PassAntragTyp" xdb:defaultTable="FP_EPASS_PASS_ANTRAEGE"/>
  <xs:complexType name="PassAntragTyp" xdb:SQLType="FP_EPASS_PASS_ANTRAEGE_T" xdb:maintainDOM="false">
      <xs:sequence>
      <xs:element name="Antrag" type="AntragTyp" xdb:SQLName="ANTRAG_TYP"/>
      <xs:element name="Person" type="PersonTyp" xdb:SQLName="PERSON_TYP"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AntragTyp" xdb:SQLType="FP_EPASS_ANTRAEGE_T" xdb:maintainDOM="false">
    <xs:sequence>
      <xs:element name="UUID" default="0" nillable="false" xdb:SQLName="UUID" xdb:SQLType="NUMBER">
        <xs:annotation>
          <xs:documentation>UUID 38-stellig</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="99999999999999999999999999999999999999"/>
            <xs:totalDigits value="38" fixed="true"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DocTyp" default="PASS" nillable="false" xdb:SQLName="DOC_TYP">
        <xs:annotation>
          <xs:documentation>Typ des Dokuments</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="2" fixed="false"/>
            <xs:maxLength value="4" fixed="false"/>
            <xs:enumeration value="ID"/>
            <xs:enumeration value="KOMB"/>
            <xs:enumeration value="PASS"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Antragsgrund" default="ABL" nillable="false" xdb:SQLName="ANTRAGSGRUND">
        <xs:annotation>
          <xs:documentation>Grund des Antrags: Erstantrag(EAN), Ersatzantrag für abgelaufene und beschädigte Pässe(ABL), Verlustantrag(VER), Namensänderung(NAM)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="3" fixed="false"/>
            <xs:maxLength value="3" fixed="false"/>
            <xs:enumeration value="EAN"/>
            <xs:enumeration value="ABL"/>
            <xs:enumeration value="VER"/>
            <xs:enumeration value="NAM"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="AntragDatum" nillable="false" xdb:SQLName="ANTRAG_DATUM">
        <xs:annotation>
          <xs:documentation>Datum des Antrags im Format DD.MM.YYYY</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="10"/>
            <xs:maxLength value="10"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="AntragOrt" nillable="false" xdb:SQLName="ANTRAG_ORT">
        <xs:annotation>
          <xs:documentation>Ort des Antrags</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="60"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="PersonTyp" xdb:SQLType="FP_EPASS_PERSONEN_T" xdb:maintainDOM="false">
    <xs:sequence>
      <xs:element name="Name" nillable="false" xdb:SQLName="NANE">
        <xs:annotation>
          <xs:documentation>Name der Person</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="512"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Vorname" nillable="false" xdb:SQLName="VORNAME">
        <xs:annotation>
          <xs:documentation>Vorname der Person</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="512"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Geburtsdatum" default="31.12.4712" nillable="false" xdb:SQLName="GEBURTSDATUM">
        <xs:annotation>
          <xs:documentation>Geburtsdatum der Person im Format DD.MM.YYYY</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="10"/>
            <xs:maxLength value="10"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Geschlecht" default="M" nillable="false" xdb:SQLName="GESCHLECHT">
        <xs:annotation>
          <xs:documentation>Geschlecht der Person M | W</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="1"/>
            <xs:enumeration value="M"/>
            <xs:enumeration value="W"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Passtitel" nillable="false" xdb:SQLName="PASSTITEL">
        <xs:annotation>
          <xs:documentation>Passtitel der Person </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="50"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Groesse" default="*" nillable="false" xdb:SQLName="GROESSE">
        <xs:annotation>
          <xs:documentation>Grösse der Person in cm, * bei Kindern</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1" fixed="false"/>
            <xs:maxLength value="3" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Strasse" default="*" nillable="false" xdb:SQLName="STRASSE">
        <xs:annotation>
          <xs:documentation>Amtliche Adresse der Person : Strasse</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1" fixed="false"/>
            <xs:maxLength value="60" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Hausnummer" default="*" nillable="false" xdb:SQLName="HAUSNUMMER">
        <xs:annotation>
          <xs:documentation>Amtliche Adresse der Person : Hausnummer</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1" fixed="false"/>
            <xs:maxLength value="10" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="PLZ" default="*" nillable="false" xdb:SQLName="PLZ">
        <xs:annotation>
          <xs:documentation>Amtliche Adresse der Person : PLZ</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1" fixed="false"/>
            <xs:maxLength value="12" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Ort" default="*" nillable="false" xdb:SQLName="ORT">
        <xs:annotation>
          <xs:documentation>Amtliche Adresse der Person : Ort</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1" fixed="false"/>
            <xs:maxLength value="60" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="LandIso316613" default="LIE" nillable="false" xdb:SQLName="LAND_ISO_3166_13">
        <xs:annotation>
          <xs:documentation>Amtliche Adresse der Person : Kurzzeichen ISO 3166 1 3 des Landes</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="3" fixed="false"/>
            <xs:maxLength value="3" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Telefon" default="" nillable="false" xdb:SQLName="TELEFON">
        <xs:annotation>
          <xs:documentation>TelefonNr der Person für Erreichbarkeit zu Bürozeiten</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0" fixed="false"/>
            <xs:maxLength value="30" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Email" default="" nillable="false" xdb:SQLName="EMAIL">
        <xs:annotation>
          <xs:documentation>Email Adresse der Person für Erreichbarkeit</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0" fixed="false"/>
            <xs:maxLength value="255" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Versand" default="EDA" nillable="false" xdb:SQLName="VERSAND">
        <xs:annotation>
          <xs:documentation>Art des Pass-Versands</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="3" fixed="false"/>
            <xs:maxLength value="3" fixed="false"/>
            <xs:enumeration value="EDA"/>
            <xs:enumeration value="WHG"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Lieferadresse" default="" nillable="false" xdb:SQLName="LIEFERADRESSE">
        <xs:annotation>
          <xs:documentation>Lieferadresse des Pass-Versands</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0" fixed="false"/>
            <xs:maxLength value="512" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="BesKennz" default="" nillable="true" xdb:SQLName="BES_KENNZ">
        <xs:annotation>
          <xs:documentation>Besondere Kennzeichen der Person</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0" fixed="false"/>
            <xs:maxLength value="200" fixed="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="NameVornameVater" default="" nillable="false" xdb:SQLName="NAME_VORNAME_VATER">
        <xs:annotation>
          <xs:documentation>Name und Vorname des Vaters</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="512"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="LedNameVornameMutter" default="" nillable="false" xdb:SQLName="LED_NAME_VORNAME_MUTTER">
        <xs:annotation>
          <xs:documentation>Lediger Name und Vorname der Mutter</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="512"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="NameVornameEhepartner" default="" nillable="false" xdb:SQLName="NAME_VORNAME_EHEPARTNER">
        <xs:annotation>
          <xs:documentation>Name und Vorname des Ehepartners</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="512"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="NameVornameVertreter" default="" nillable="true" xdb:SQLName="NAME_VORNAME_VERTRETER">
        <xs:annotation>
          <xs:documentation>Name und Vorname des gesetzlichen Vertreters</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="512"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FotoID" nillable="true" xdb:SQLName="FOTO_ID" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Foto der Person für die ID (ID: nicht optional; muss mit SafeID abgesprochen werden)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FotoPass" nillable="true" xdb:SQLName="FOTO_PASS" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Foto der Person für den Pass (PASS: nicht optional; muss mit SafeID abgesprochen werden)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SignID" nillable="true" xdb:SQLName="SIGN_ID" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Unterschrift der Person für die ID (ID: nicht optional; muss mit SafeID abgesprochen werden)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SignPass" nillable="true" xdb:SQLName="SIGN_PASS" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Unterschrift der Person für den Pass (PASS: nicht optional; muss mit SafeID abgesprochen werden)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SignVertreter" nillable="true" xdb:SQLName="SIGN_VERTTRETER" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Unterschrift des gestzlichen Vertreters</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpDG3" nillable="true" xdb:SQLName="FP_DG3" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [DG3] (KOMB und PASS: nicht optional)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpFinger1" nillable="true" xdb:SQLName="FP_FINGER1" xdb:SQLType="NUMBER">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [Finger1] (KOMB und PASS: nicht optional) 1=r.Daumen;2=r.Zeige;3=r.Mittel;4=r.Ring;(5=r.Klein); 6=l.Daumen;7=l.Zeige;8=l.Mittel;9=l.Ring;10=l.Klein;20=kein Finger</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:long">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="20"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpQualitaet1" nillable="true" xdb:SQLName="FP_QUALITAET1" xdb:SQLType="NUMBER">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [Qualität1] (KOMB und PASS: nicht optional)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:long">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="100"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpCaptureDevice1" nillable="true" xdb:SQLName="FP_CAPTURE_DEVICE1" xdb:SQLType="VARCHAR2">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [CaptureDevice1]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="200"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpWSQ1" nillable="true" xdb:SQLName="FP_WSQ1" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [WSQ1]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpFinger2" nillable="true" xdb:SQLName="FP_FINGER2" xdb:SQLType="NUMBER">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [Finger2] (KOMB und PASS: nicht optional) 1=r.Daumen;2=r.Zeige;3=r.Mittel;4=r.Ring;(5=r.Klein); 6=l.Daumen;7=l.Zeige;8=l.Mittel;9=l.Ring;10=l.Klein;20=kein Finger</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:long">
            <xs:minInclusive value="1"/>
            <xs:maxInclusive value="20"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpQualitaet2" nillable="true" xdb:SQLName="FP_QUALITAET2" xdb:SQLType="NUMBER">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [Qualität2]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:long">
            <xs:minInclusive value="0"/>
            <xs:maxInclusive value="100"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpCaptureDevice2" nillable="true" xdb:SQLName="FP_CAPTURE_DEVICE2" xdb:SQLType="VARCHAR2">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [CaptureDevice2]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="200"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FpWSQ2" nillable="true" xdb:SQLName="FP_WSQ2" xdb:SQLType="BLOB">
        <xs:annotation>
          <xs:documentation>Fingerprint der Person [WSQ2]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
Has somebody an idea what i colud change in the XSD schema file to solve the problem?

Many thanks in advance.

Regards,
Martin
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points