dbTalk Databases Forums  

dbxml xquery exception

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss dbxml xquery exception in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
James
 
Posts: n/a

Default dbxml xquery exception - 05-18-2006 , 09:40 PM






Hi everybody,

I encountered an XmlException in executing an xquery, the following is
the sample xml text:
----------------------------------------------------------------------
- <Content>
<Terrorist_Organization>Unknown Group</Terrorist_Organization>
<Incident_Date>Jan. 26, 1988</Incident_Date>
<City>Cairo</City>
<Country_Area>Egypt</Country_Area>
<Region>Africa</Region>
<Target>Business</Target>
<Tactic>Bombing</Tactic>
<Suicide>No</Suicide>
<Weapon>Explosives</Weapon>
<Fatalities>0</Fatalities>
<Injuries>0</Injuries>
<US_Attack>Yes</US_Attack>
<US_Fatalities>0</US_Fatalities>
<US_Injuries>0</US_Injuries>
<Attack_Claimed>No</Attack_Claimed>
<Coordinated>No</Coordinated>
<Description>EGYPT. A bomb exploded in a bookshop in the Nile Hilton
Hotel annex in downtown Cairo. No casualties were reported and damage
was slight.</Description>
<Information_Source>Chronology Data 1968-1997</Information_Source>
<Publication_Date>04/03/2001</Publication_Date>
<Incident_Data_Provider>RAND Corporation</Incident_Data_Provider>
</Content>
-----------------------------------------------------------------------------
The query text and the error message is like this:
===============================================
query text :
collection('TerroristIncident.dbxml')/TerroristIncident[(contains(upper-case(//Content/Injuries//.),upper-case('3')))]
com.sleepycat.dbxml.XmlException: Error: SequenceType matching failed:
the sequence contains more than one item [err:XPTY0004], errcode =
XPATH_EVALUATION_ERROR
com.sleepycat.dbxml.XmlException: Error: SequenceType matching failed:
the sequence contains more than one item [err:XPTY0004], errcode =
XPATH_EVALUATION_ERROR
at
com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_query __SWIG_0(Native
Method)
at com.sleepycat.dbxml.XmlManager.query(XmlManager.ja va:544)
at com.sleepycat.dbxml.XmlManager.query(XmlManager.ja va:242)
at dbxml.DbXmlUtil.queryForResourceIDs(Unknown Source)
at server.ServerThread.performWindowQuery(Unknown Source)
at server.ServerThread.run(Unknown Source)
===============================================

I found that the exception is caused by querying a node which is
acutally a sequence. But the node being queried (Content/Injuries) is
clearly not a sequence in my case. I suspect some special characters
caused the problem. Does anyone see this problem before? Any suggestion
is appreciated.

regards,
James


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.