My Oracle Support Banner

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

Last updated on MARCH 17, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A 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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.