ORA-01861 When Select In Xml-column After Migrate To 11.2 (Doc ID 1477193.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Server - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

Symptoms

Inserting an XML document into a an XMLTYPE column, where the table storage is Binary XML and the table is XML schema constrained, fails with:

ORA-31061: XDB error: XML event error
ORA-19202: Error occurred in XML processing
LSX-00221: "I3" is too short (minimum length is 10)

For Example:

select extractValue(xtab.column_value, 'druckvorlage/dv_nr')
  from angebote ang,
  xmltable('for $i in /angebot/auftrag/druckvorlagen
  return
  let $anzahlDruckvorlagen := count($i/druckvorlage)
  for $aktuelleDruckvorlage in (1 to $anzahlDruckvorlagen)
  return
  {$i/druckvorlage[position()=$aktuelleDruckvorlage]/dv_nr/text()}
  ' passing ang.verfallanzeige) xtab;

Fails with:

 LSX-00221: "I3" is too short (minimum length is 10)


Executing a query using the XMLQuery fails in the same manner:

select XMLCast( XMLQuery( 'druckvorlage/dv_nr' passing xtab.column_value RETURNING CONTENT)
AS NUMBER)
from angebote ang,
  xmltable('for $i in /angebot/auftrag/druckvorlagen
  return
  let $anzahlDruckvorlagen := count($i/druckvorlage)
  for $aktuelleDruckvorlage in (1 to $anzahlDruckvorlagen)
  return
  {$i/druckvorlage[position()=$aktuelleDruckvorlage]/dv_nr/text()}
  ' passing ang.verfallanzeige) xtab;


NOTE: The table is registered against a schema and the storage used is Binary XML.

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms