Xmlquery error in 10.2.0.4

Hi,
I run a xmlquery in one of my 10g R2 database, below is the database info.
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Sep 6 09:09:41 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter user-name: scott
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version
2 ;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
The xmlquery I run is as below
select sn,xmlquery(
declare function local:getChildren($p as element()) as element()*
*for $i in $p/Prop[@Name="TS"]/Prop[@Name="SequenceCall"]/Prop[@Name="ResultList"]/Value*
return
*if ($i/Prop[@Type="TEResult"]/Prop[5]/@Name="Measurement")*
then (
*for $t in $i/Prop[@Type="TEResult"]/Prop[@Name="Measurement"]/Value*
return
*element r {*
*element StepName1 {$t/Prop/@Name}*
*,element Status1 {$t/Prop/Prop[@Name="Status"]/Value/text()}*
*,element Comp1 {$t/Prop/Prop[@Name="Comp"]/Value/text()}*
*,element Data1 {$t/Prop/Prop[@Name="Data"]/Value/text()}*
*,element Testname1 {$i/Prop[@Type="TEResult"]/Prop[@Name="TS"]/Prop[@Name="StepName"]/Value/text()}*
else
*local:getChildren($i/Prop[@Type="TEResult"])*
*local:getChildren(/Reports/Report/Prop[@Type="TEResult"])'*
passing by value xmltype(z.test_log_text)
returning content) xml
from cust_test_log z
where sn='TEST_XQUERY2'
but the error "ORA-19112, error raised during evalution: oracle.xml.parser.v2XMLparseException: Expected name instead of -. " prompt.
the same xquery run fine in Oracle 11g R2 and stylusstudio, is there any limitation to run such xquery in 10gR2?
Thanks
Vincent
Edited by: pj**** on 05-Sep-2011 18:17
Edited by: pj**** on 05-Sep-2011 18:17

Hi, Odie
The xquery run fine in small XML contend, and the error prompt for those big XML (around 1.8MB),
Please download the xml file from http://124.82.216.245:81/test_xquery2.xml
below is the code
select sn,xmlquery(
       declare function local:getChildren($p as element()) as element()*
         for $i in $p/Prop[@Name="TS"]/Prop[@Name="SequenceCall"]/Prop[@Name="ResultList"]/Value
         return
         if ($i/Prop[@Type="TEResult"]/Prop[5]/@Name="Measurement")
         then (
             for $t in $i/Prop[@Type="TEResult"]/Prop[@Name="Measurement"]/Value
             return
             element r {
                     element StepName1 {$t/Prop/@Name}
                    ,element Status1 {$t/Prop/Prop[@Name="Status"]/Value/text()}
                    ,element Comp1 {$t/Prop/Prop[@Name="Comp"]/Value/text()}
                    ,element Data1 {$t/Prop/Prop[@Name="Data"]/Value/text()}
                    ,element Testname1 {$i/Prop[@Type="TEResult"]/Prop[@Name="TS"]/Prop[@Name="StepName"]/Value/text()}
         else
           local:getChildren($i/Prop[@Type="TEResult"])
        local:getChildren(/Reports/Report/Prop[@Type="TEResult"])'
        passing by value xmltype(z.test_log_text)
        returning content) xml
from cust_test_log z
where sn='TEST_XQUERY2' Thanks
Vincent
Edited by: pj**** on 06-Sep-2011 02:40
Edited by: pj**** on 06-Sep-2011 02:42

Similar Messages

  • ERROR  when called TO_CHAR function from XMLQuery

    when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHAR
    any help/ideas on the follwing would be much appreciated.
    Thanks
    Abdul
    select XMLQuery('<marketfeed id="f1" action="CREATE" source="marketfeed1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <competitions>
    {for $f in ora:view("fixture")
                        for $c in ora:view("competition")
                         for $homes in ora:view("squad")
                          for $aways in ora:view("squad")
                           for $homet in ora:view("team")
                            for $awayt in ora:view("team")
                       where $f/ROW/GID = "g321667"
                          and $f/ROW/COMPETITIONID = $c/ROW/ID
                          and $f/ROW/HOMESQUADID = $homes/ROW/ID
                          and $f/ROW/AWAYSQUADID = $aways/ROW/ID
                          and $homes/ROW/TEAMID = $homet/ROW/ID
                          and $aways/ROW/TEAMID = $awayt/ROW/ID
                       return              
                       <competition id="{$c/ROW/ID/text()}"
    shortname="{$c/ROW/NAME/text()}"
    name="{$c/ROW/NAME/text()}">
    <teamlists>
    <teamitam name="{$homet/ROW/NAME/text()}"
    id = "{$homes/ROW/TID/text()}" />
    <teamitem name="{$awayt/ROW/NAME/text()}"
    id = "{$aways/ROW/TID/text()}" />
    </teamlists>
    <matches>
    <match id="{$f/ROW/GID/text()}"
    venue="{$f/ROW/VENUE/text()}"
    matchdate="{TO_CHAR($f/ROW/STARTDATE/text(), "YY-MM-DD")}"
    name="{concat($homet/ROW/NAME/text(), " v ", $awayt/ROW/NAME/text())}"
    >
    <teams>
    <team home="H" id = "{$homes/ROW/TID/text()}" />
    <team home="A" id = "{$aways/ROW/TID/text()}" />
    </teams>
    </match>
    </matches>
    </competition>
    </competitions>
    </marketfeed>'
    returning content
    from dual
    Edited by: QAbdul on 26-Oct-2010 06:44

    Hi,
    QAbdul wrote:
    when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHARTO_CHAR is a SQL function, XQuery is unaware of it.
    XPath 2.0 specifications define a fn:format-date function but Oracle has not included yet in its XQuery implementation.
    Easiest way to go is A_Non's solution, but if you need to format at multiple places in the query, you can declare a local XQuery function.
    For example, to format to "DD/MM/YYYY" from the canonical xs:date format "YYYY-MM-DD" :
    {code}
    declare function local:format-date($d as xs:date) as xs:string
    let $s := xs:string($d)
    return concat(
    substring($s, 10, 2), "/",
    substring($s, 7, 2), "/",
    substring($s, 2, 4)
    {code}
    and an example of use :
    {code}
    SQL> CREATE TABLE test_xqdate AS SELECT sysdate dt FROM dual;
    Table created
    SQL> SELECT *
    2 FROM XMLTable(
    3 'declare function local:format-date($d as xs:date) as xs:string
    4 {
    5 let $s := xs:string($d)
    6 return concat(
    7 substring($s, 10, 2), "/",
    8 substring($s, 7, 2), "/",
    9 substring($s, 2, 4)
    10 )
    11 }; (: :)
    12 for $i in ora:view("TEST_XQDATE")/ROW/DT
    13 return element e {
    14 attribute xs_date_format { $i/text() },
    15 attribute local_format { local:format-date($i) }
    16 }'
    17 COLUMNS
    18 xs_date_format VARCHAR2(10) PATH '@xs_date_format',
    19 local_format VARCHAR2(10) PATH '@local_format'
    20 )
    21 ;
    XS_DATE_FORMAT LOCAL_FORMAT
    2010-10-28 28/10/2010
    {code}

  • XMLQuery SQL Error: ORA-00600: internal error code,

    Hi guys,
    I am trying to use XML feature of Oracle DB. What I am trying to implement is having XMLTYpe field in table and have some values in it and then query that table using XMLQuery(...). I started with example here : http://www.psoug.org/reference/xmlquery.html .
    I am able to create table, Insert data into table, but when I tried to run SELECT query it does not work
    "SELECT person_id, XMLQuery(
    'for $i in /PDRecord
    where $i /PDName = "Daniel Morgan"
    order by $i/PDName
    return $i/PDName'
    passing by value person_data
    RETURNING CONTENT) XMLData
    FROM person_data; "
    It throws error like
    "Error report:
    SQL Error: ORA-00600: internal error code, arguments: [qmxqrwRewExpr:1], [], [], [], [], [], [], []
    00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    Am I missing any thing? or is my Oracle 10g DB is not compatible with XMLType ?
    Please help.

    Hi Marco,
    Thanks for replying.
    Oracle Database 10g Release 10.2.0.1.0 - Production. so as per you said it should work. I am sorry for being dumb, but I am not DBA guy. can you tell me how to check if XMLDB is installed properly? how can I look at DBA_REGISTRY and what kind of information I will find under DBA_REGISTRY?
    BTW I found another way of querying XMLType columns from here http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96620/xdb04cre.htm which uses extract(), existsNode(), etc.. function to accomplish some of the task. As of now I am still digging in it, so not sure which one will be better to use. I mean the link that I showed on my first thread or the above link.
    I am still curious why wouldnt my first thread query work.
    Thanks again.

  • ORA-31061 error while creating XMLType table with virtual column

    I'm not calling it frustration ;)
    but still... what about this one :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> create table test_virtual of xmltype
      2  xmltype store as binary xml
      3  virtual columns (
      4    doc_id as (
      5      xmlcast(
      6        xmlquery('/root/@id'
      7        passing object_value returning content)
      8        as number
      9      )
    10    )
    11  )
    12  ;
    Table created.Now, on the latest version :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> create table test_virtual of xmltype
      2  xmltype store as binary xml
      3  virtual columns (
      4    doc_id as (
      5      xmlcast(
      6        xmlquery('/root/@id'
      7        passing object_value returning content)
      8        as number
      9      )
    10    )
    11  )
    12  ;
          passing object_value returning content)
    ERROR at line 7:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-31061: XDB error: dbms_xdbutil_int.get_tablespace_tab
    ORA-06512: at "XDB.DBMS_XDBUTIL_INT", line 1002Is there something I should be aware of?
    Right now, I'm just evaluating the version so I can't submit any SR.
    Thanks for anyone trying to reproduce the issue.

    Just tested again on a new installation (64-bit server).
    It works :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL>
    SQL> create table test_virtual of xmltype
      2  xmltype store as binary xml
      3  virtual columns (
      4    doc_id as (
      5      xmlcast(
      6        xmlquery('/root/@id'
      7                 passing object_value returning content)
      8        as number
      9      )
    10    )
    11  );
    Table created
    Now I'll try to see what are the differences between the two installations.
    Thanks Dan and Marco for looking into this.
    Edited by: odie_63 on 2 mai 2012 15:51

  • ORA-7445[qkarid()+872] error

    Hi,
    I am using Binary XML DB .
    Here is the DB banner info.
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE     11.2.0.1.0     Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    I am getting ORA-7445[qkarid()+872] error while executing a query
    SELECT XMLCast(XMLQuery('$p/PurchaseOrder/Reference' PASSING OBJECT_VALUE AS "p"
    RETURNING CONTENT)
    AS VARCHAR2(30)) "Reference"
    FROM purchaseorder
    WHERE XMLExists('$p/PurchaseOrder[User="SBELL"]' PASSING OBJECT_VALUE AS "p") for update wait 60;
    Please advise
    Thanks

    Update to 11.2.0.3.0 and see if it goes away. If that is not poissble open a tar with Oracle Support
    c:\xdb\examples\SXI_Generator>sqlplus SXIGEN/SXIGEN
    SQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 5 12:48:17 2012
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> desc PURCHASEORDER
    Name                                      Null?    Type
    TABLE of SYS.XMLTYPE STORAGE BINARY
    SQL> SELECT XMLCast(XMLQuery('$p/PurchaseOrder/Reference' PASSING OBJECT_VALUE AS "p"
      2  RETURNING CONTENT)
      3  AS VARCHAR2(30)) "Reference"
      4  FROM purchaseorder
      5  WHERE XMLExists('$p/PurchaseOrder[User="SBELL"]' PASSING OBJECT_VALUE AS "p") for update wait 60;
    Reference
    SBELL-20100408134226318PDT
    SBELL-20100419204001680PDT
    SBELL-20100420220510663PDT
    SBELL-20100422220520735PDT
    SBELL-20100427173413101PDT
    ...Edited by: mdrake on Mar 5, 2012 12:48 PM

  • Error while posting XML from a scheduled transaction to another transaction

    When I try posting an XML from one transaction to another in a different project by calling it as a webservice, it doen't hit the other transaction.
    I see this in the Netweaver error logs:
    java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:111)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)  [see details]
    XML AssignXml Parse Error
    [EXCEPTION]
    org.xml.sax.SAXParseException: Premature end of file.... [see details]
    AND
    [Fatal Error] :-1:-1: Premature end of file.
    More interestingly it happens ONLY when I schedule the parent transaction, when I trigger it manual everything works fine.
    Any help appreciated.

    Hi Srinivas,
    I see that this post was marked as answered. Could you please elaborate on how this problem was fixed?
    I am experiencing a similar issue:
    I am trying to get the Active Portal application running in MII 12.1.7 (also 12.1.8) and all went well up to the point where the ActivePortalMonitor transaction is scheduled. In the logs I also receive the  org.xml.sax.SAXParseException.
    The culprit is the XMLQuery block in that txn. Just like with your situation, when ran from workbench it works; when scheduled it doesn't.
    I tried replacing the XMLQuery with other blocks that get the same result, i.e. XMLLoader or HTTPLoader + StringToXMLParser; and in all cases the XML fetching element bombs out.
    I also built a simple txn that does an XMLQuery on another txn and then dumps the output in a file. Same thing: when run from workbench it runs fine; from scheduler it gives "SAX" error
    I would post the specific error log, but it is always varying, here is one example:
    [ERROR] [Untitled_0]org.xml.sax.SAXParseException: Open quote is expected for attribute "DIR" associated with an element type "HTML".
    Any help/hints are much appreciated
    Kind Regards,
    Fanie

  • Error while trying to access repository from Application Explorer

    Hi All,
    I am trying to access the targets which I had previously created from AE. Everything was working fine. When I tried running iwae.sh script and open the target from AE it throws below error today.
    com.iwaysoftware.iwrepository.RepositoryException
    at com.iwaysoftware.iwrepository.xml.XMLRepository.end(XMLRepository.java:272)
    at com.iwaysoftware.iwrepository.xml.file.FileRepository.end(FileRepository.java:436)
    at com.iwaysoftware.iwrepository.xml.XMLQuery.executeQuery(XMLQuery.java:863)
    at com.iwaysoftware.af.container.IWAFRepositoryOP.getConfigs(IWAFRepositoryOP.java:167)
    at com.iwaysoftware.af.container.IWAFRepositoryStorage.listConfigurations(IWAFRepositoryStorage.java:215)
    at com.iwaysoftware.af.container.ChannelManager.listConfigurations(ChannelManager.java:100)
    at com.iwaysoftware.af.container.IWAFContainer.listChannelConfigurations(IWAFContainer.java:360)
    at com.iwaysoftware.af.container.AEManager.buildChannelList(AEManager.java:252)
    Not sure what has changed? Is this a corruption with the repository.xml file ? Is there any way to get around this error.
    Regards
    Subhankar

    Hi all,
    The above mentioned solution is a good idea but in this context not appropriate as it aims at resolving an issue in the delivered Content Version of 0TCT_VC11.
    In your case, you already have 0TCT_VC11 activated and you can not read any data from this VirtualProvider in queries. Right?
    In that case, you have to:
    1. Check that the entire data flow is active for the InfoProvider (activation should occur for the MYSELF source system): 0TCT_VC11 with InfoSource 0TCT_IS11 with DataSource 0TCT_DS11
    2. Activate the direct access for the VirtualProvider (Context menu of 0TCT_VC_11 > Activate Direct Access > Source Syst. for InfoSource3.x > Mark the column with the MYSELF source system and Save).
    This corresponds to Installation "Step 5.) Activate direct access for virtual providers" that is mentioned in SAP Note 934848 "Collective note: (FAQ) BI Administration Cockpit".
    Best regards,
    Rudolf Hennecke
    SAP NetWeaver RIG BI

  • Database Error: DBD::Oracle::db do failed: ORA-04030: out of process memory

    Hi
    I have a stored procedure that uses the XMLQuery function (SELECT XMLQuery( '......' RETURNING CONTENT) FROM dual; ) to extract data from 3 different tables and store the xml file in XML DB. This store procedure was running fine for a long time until 2 weeks ago where I started seeing the following error:
    Database Error: DBD::Oracle::db do failed: ORA-04030: out of process memory when trying to allocate 92 bytes (koh dur heap d,qmxtkWriteXobToOpn:heap)
    Currently I have 16,000 records. I am not sure what is going on, the size of the previous successful output xml file is about 2M. I also noticed when the stored procedure runs with 3G of system memory available, it basically used up all the memory and cpu time. The store proc consistently dies after 3.5 hour and spits out the ORA-04030 out of process memory error.
    Does anyone have any suggestion what to look for or what parameters I need to set? Thanks

    Unless your database is strictly a DSS-type of database, your AWR report exposes loads of issues with it. And I think none of the time during the AWR window was spent on database. Look at the DB time (with all those multi cores) compared with the elapsed time of the AWR.
    As you are on 11g, why not make use of MEMORY_TARGET (a single parameter to manage both SGA and PGA)? If you are already on it, ignore this as I can't see it anywhere. If not, get rid of SGA_TARGET and PGA_AGGREGATE_TARGET and replace it with a single MEMORY_TARGET parameter. However you may have a minimum threshold set for different SGA pools so that they won't shrink beyond that point.
    Having said that, setting MEMORY_TARGET is not a guarantee to avoid ORA-4030. Just a single bad PL/SQL code could go and exploit the untunable part of your process memory and even go and blow up the physical memory. If you are using FORALL and BULK load, see if you can cut it down into few chunks rather than running as a single process.
    What does your V$PGASTAT say?

  • Orcl:query-database gives error when using to_char function in select stmt

    hi
    Use Case : We get a csv file ("bank_import_<MMDDYYYYY>.csv") from the bank containing the transactions occured for the month. The date in the filename is retrieved into string and i need to convert this string to the format "MON-DD-YYYY". This is the required format for an header table which takes this string as primary key.
    Code:
    statement_name = '11302206'.........
    <copy>
    <from expression="concat("'select to_char(to_date('",bpws:getVariableData('statement_name') ,"','MMDDYYYY'),'MON-DD-YYYY') from dual'")"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="orcl:query-database(bpws:getVariableData('xpath'),false(),false(),'jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI')"/>
    <to variable="statement_name"/>
    </copy>
    Error:
    [2006/12/06 19:13:04] Updated variable "xpath" less
    <xpath>'select to_char(to_date('10302006','MMDDYYYY'),'MON-DD-YYYY') from dual'</xpath>
    [2006/12/06 19:13:04] "XPathException" has been thrown. less
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI")", the reason is .
    Please verify the xpath query.
    Log Message:
    <2006-12-06 19:13:04,595> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::evaluate> XPathQuery[concat("'select to_char(to_date('", bpws:getVariableData("statement_name"), "','MMDDYYYY'),'MON-DD-YYYY') from dual'")], XPath Result: class=java.lang.String value='select to_char(to_date('10302006','MMDDYYYY'),'MON-DD-YYYY') from dual'
    <2006-12-06 19:13:04,595> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::initXPath> namespaceMapping is: rootMap: {bpws=http://schemas.xmlsoap.org/ws/2003/03/business-process/, xp20=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20, ns4=http://xmlns.oracle.com/pcbpel/adapter/db/top/BAIBankUpload, ldap=http://schemas.oracle.com/xpath/extension/ldap, xsd=http://www.w3.org/2001/XMLSchema, ns5=http://xmlns.oracle.com/pcbpel/adapter/file/, client=http://xmlns.oracle.com/BAI_BankUpload, ora=http://schemas.oracle.com/xpath/extension, ns1=http://xmlns.oracle.com/pcbpel/adapter/file/readBAIBankImportCSV/, ns3=http://TargetNamespace.com/readBAIBankImportCSV, ns2=http://xmlns.oracle.com/pcbpel/adapter/db/Insert_SI_CE_STATEMENT_LINES_INT/, bpelx=http://schemas.oracle.com/bpel/extension, orcl=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc, =http://schemas.xmlsoap.org/ws/2003/03/business-process/}
    scopedMap: {}
    <2006-12-06 19:13:04,751> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::evaluate> XPathQuery :orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croakercom:1529:RSICMI")
    org.collaxa.thirdparty.jaxen.FunctionCallException
         at org.collaxa.thirdparty.jaxen.FunctionCallException.fillInStackTrace(FunctionCallException.java:124)
         at java.lang.Throwable.<init>(Throwable.java:195)
         at java.lang.Exception.<init>(Exception.java:41)
         at org.collaxa.thirdparty.jaxen.saxpath.SAXPathException.<init>(SAXPathException.java:83)
         at org.collaxa.thirdparty.jaxen.JaxenException.<init>(JaxenException.java:82)
         at org.collaxa.thirdparty.jaxen.FunctionCallException.<init>(FunctionCallException.java:86)
         at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:190)
         at org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:184)
         at org.collaxa.thirdparty.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:724)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodes(BaseXPath.java:253)
         at org.collaxa.thirdparty.jaxen.BaseXPath.evaluate(BaseXPath.java:210)
         at com.collaxa.cube.xml.xpath.XPathUtil.evaluate(XPathUtil.java:93)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:501)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:122)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Root cause:
    java.lang.ClassCastException
         at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:158)
         at org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:184)
         at org.collaxa.thirdparty.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:724)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodes(BaseXPath.java:253)
         at org.collaxa.thirdparty.jaxen.BaseXPath.evaluate(BaseXPath.java:210)
         at com.collaxa.cube.xml.xpath.XPathUtil.evaluate(XPathUtil.java:93)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:501)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:122)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-12-06 19:13:04,751> <ERROR> <UAT.collaxa.cube.xml> ORABPEL-09500
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI")", the reason is .
    Please verify the xpath query.

    Hi,
    QAbdul wrote:
    when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHARTO_CHAR is a SQL function, XQuery is unaware of it.
    XPath 2.0 specifications define a fn:format-date function but Oracle has not included yet in its XQuery implementation.
    Easiest way to go is A_Non's solution, but if you need to format at multiple places in the query, you can declare a local XQuery function.
    For example, to format to "DD/MM/YYYY" from the canonical xs:date format "YYYY-MM-DD" :
    {code}
    declare function local:format-date($d as xs:date) as xs:string
    let $s := xs:string($d)
    return concat(
    substring($s, 10, 2), "/",
    substring($s, 7, 2), "/",
    substring($s, 2, 4)
    {code}
    and an example of use :
    {code}
    SQL> CREATE TABLE test_xqdate AS SELECT sysdate dt FROM dual;
    Table created
    SQL> SELECT *
    2 FROM XMLTable(
    3 'declare function local:format-date($d as xs:date) as xs:string
    4 {
    5 let $s := xs:string($d)
    6 return concat(
    7 substring($s, 10, 2), "/",
    8 substring($s, 7, 2), "/",
    9 substring($s, 2, 4)
    10 )
    11 }; (: :)
    12 for $i in ora:view("TEST_XQDATE")/ROW/DT
    13 return element e {
    14 attribute xs_date_format { $i/text() },
    15 attribute local_format { local:format-date($i) }
    16 }'
    17 COLUMNS
    18 xs_date_format VARCHAR2(10) PATH '@xs_date_format',
    19 local_format VARCHAR2(10) PATH '@local_format'
    20 )
    21 ;
    XS_DATE_FORMAT LOCAL_FORMAT
    2010-10-28 28/10/2010
    {code}

  • Errors creating indexes on Binary XML Tables

    Hi,
    Oracle details are as follows:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production"
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I'm currently having an issue when attempting to create a suitable index on a binary xml table. I have a Binary xml table that stores a number of xml documents. I have created an index on this table as follows:
    create index TEST_WQI_idx_1 on TEST_WEB_QUOTE_INDX1(OBJECT_VALUE)
    INDEXTYPE IS XDB.XMLINDEX
    PARAMETERS ('PATHS (INCLUDE
    (/webPolicy/QuoteId))');
    Querying the table with the following:
    SQL> l
    1 select xmlcast(xmlquery('/webPolicy/Sections/interopSection[1]/PolicyItems/item/Version/text()' PASSING OBJECT_VALUE RETURNING CONTENT)
    2 as number) "VERSION",
    3 xmlcast(xmlquery('/webPolicy/QuoteId/text()' PASSING OBJECT_VALUE RETURNING CONTENT)
    4 as number) "QUOTEID"
    5 FROM TEST_WEB_QUOTE_INDX1
    6 where xmlcast(xmlquery('/webPolicy/QuoteId/text()' PASSING OBJECT_VALUE RETURNING CONTENT)
    7* as number) = 22824
    SQL> /
    VERSION QUOTEID
    1 22824
    Execution Plan
    Plan hash value: 3559428808
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 545 | 1071K| 1030 (1)| 00:00:19 |
    | 1 | SORT AGGREGATE | | 1 | 3022 | | |
    |* 2 | TABLE ACCESS BY INDEX ROWID | SYS895336_TEST_WQI__PATH_TABLE | 1 | 3022 | 2 (0)| 00:00:01 |
    |* 3 | INDEX RANGE SCAN | SYS895336_TEST_WQI__PIKEY_IX | 1 | | 1 (0)| 00:00:01 |
    |* 4 | FILTER | | | | | |
    | 5 | TABLE ACCESS FULL | TEST_WEB_QUOTE_INDX1 | 545 | 1071K| 4 (0)| 00:00:01 |
    | 6 | SORT AGGREGATE | | 1 | 3022 | | |
    |* 7 | TABLE ACCESS BY INDEX ROWID| SYS895336_TEST_WQI__PATH_TABLE | 1 | 3022 | 2 (0)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN | SYS895336_TEST_WQI__PIKEY_IX | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(SYS_XMLI_LOC_ISTEXT("SYS_P0"."LOCATOR","SYS_P0"."PATHID")=1)
    3 - access("SYS_P0"."RID"=:B1 AND "SYS_P0"."PATHID"=HEXTORAW('5E6C') )
    4 - filter(CAST( (SELECT "SYS"."STRAGG"("SYS_P2"."VALUE") FROM
    "WEB_STAGING"."SYS895336_TEST_WQI__PATH_TABLE" "SYS_P2" WHERE "SYS_P2"."PATHID"=HEXTORAW('5E6C') AND
    "SYS_P2"."RID"=:B1 AND SYS_XMLI_LOC_ISTEXT("SYS_P2"."LOCATOR","SYS_P2"."PATHID")=1) AS number)=22824)
    7 - filter(SYS_XMLI_LOC_ISTEXT("SYS_P2"."LOCATOR","SYS_P2"."PATHID")=1)
    8 - access("SYS_P2"."RID"=:B1 AND "SYS_P2"."PATHID"=HEXTORAW('5E6C') )
    Note
    - dynamic sampling used for this statement (level=2)
    - Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)
    However, I also need to add an additional field to this index to allow appropriate queries against the data in the table, version number. This field can be seen from the statement above (VERSION) which runs OK and returns the data I’d expect. However, when I attempt to add this index using the following statement I get an error returned and the index becomes corrupted:
    alter index TEST_WQI_idx_1 rebuild
    parameters ('PATHS (INCLUDE ADD
    (/webPolicy/Sections/interopSection[1]/PolicyItems/item/Version))');
    After some investigation, the issue seems to revolve around the use of the [1] condition in the statement /interopSection[1]. I can create the index by removing the [1] condition, but this does not return the expected result. In actual fact, as there are 2 interopSection elements in the xml file, both with a version number of 1, the statement returns 11, which would appear to be the two version numbers concatenated together. I need to be able to reference the version number from the first interopSection in the queries against the table, and I need to be able to index this column correctly for performance issues.
    I'm unsure why this xpath statement is not working correctly in the alter index statement, but returns ok when used within the query against the table and was wondering if you would be able to help me to have a working index against this element.
    Thanks in advance for any help you can provide in relation to this.

    Sorry, here is the error:
    Error starting at line 20 in command:
    alter index TEST_WQI_idx_1 rebuild
    parameters ('PATHS (INCLUDE ADD
    (/webPolicy/Sections/interopSection[1]/PolicyItems/item/Version))')
    Error report:
    SQL Error: ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
    ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary
    ORA-30968: invalid XPATH or NAMESPACE option for XML Index
    29858. 00000 - "error occurred in the execution of ODCIINDEXALTER routine"
    *Cause:    Failed to successfully execute the ODCIIndexAlter routine.
    *Action:   Check to see if the routine has been coded correctly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Poor performance when xmlquery contains attribute matching XPATH

    We send a select xmlquery to Oracle 11g database, if the query contains an XPATH that has an attribute name test in it, the performance is significantly worse than if indexing is used. Here are the two queries:
    1)
    select xmlquery('declare default element namespace "namespace"; for $e at $pos in $c/services/service let $result := if ($pos >= 2) then "|||||ERROR|||||" else $e return $result' passing document as "c" RETURNING CONTENT).getStringVal(), "LASTUPDATE" from services where id = :1
    2)
    select xmlquery('declare default element namespace "namespace"; for $e at $pos in $c/services/service[1] let $result := if ($pos >= 2) then "|||||ERROR|||||" else $e return $result' passing document as "c" RETURNING CONTENT).getStringVal(), "LASTUPDATE" from services where id = :1
    The only difference is the two XPATHS:
    1)$c/services/service
    2)$c/services/service[1]
    The second query performs 7X to 10X better than the first. More specifically, the Oracle DB CPU will reach 80-100% with only 40 tps of the first query but the second could hit 500 tps.
    We would expect the first to perform slightly worse than the second, because Oracle would need to compare the uri values in the doc to the query. But, the documents being searched only contain one service/@uri.
    Does anyone know why the performance is so bad with the first query? Is there anything we can do to tune the DB to help in this area. We need to be able to do the first query but the current CPU utilization is extremely too much.

    sorry, number 1 should be $services/service(@uri="test"). That should be [ instead of (, the forum wasn't displaying it correctly above.  It should be that way in the query as well.
    Edited by: user6668496 on Mar 10, 2009 1:50 PM

  • Error getting list of users

    Hi All,
    I have a  transaction for getting the list of users and sending mail to them. I have used XML query to get the list of users using the following URL:
    "http://<server:port>/XMII/Illuminator?Service=Admin&Mode=UserList&Group=XMII Administrators&Content-Type=text/xml".
    When I am executing the transaction from Workbench, I am getting the list of users but  if I run the transaction using a scheduler, I am getting the following as output of XML query.
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowsets DateCreated="2009-07-14T06:17:51" EndDate="2009-07-14T06:17:51" StartDate="2009-07-14T06:17:51" Version="12.0.4 Build(120)"><FatalError>Premature end of file.</FatalError></Rowsets>
    I have added the the necessary roles to Admin service(System Security).
    What could be the reason for this??
    Thanks,
    Sophila

    Sophila - from the WB you are already logged in so the URL works, but from the scheduler there is no user account to permit this fully qualified http request, so the premature end of file error is because the XMLQuery is expecting Rowsets/Rowset/Row xml back but gets the NW login page instead.
    Either pass the necessary credentials into the TRX through the scheduler parameters and append them into the URL in your XMLQuery dynamically or just add them as static:  &IllumLoginName=XXX&IllumLoginPassword=XXX  (this will need to be a user with permission to the Admin service).

  • Cannot use "declare function" in XMLQuery statement

    Hi All,
    I'm using Oracle 11g. In a SQL*Plus terminal, if I enter, say:
    select XMLQUERY('
    1
    passing (XMLTYPE('&lt;dummy /&gt;')) returning content) from dual;
    I get, as expected, "1" as an answer. Now, if instead I enter the following code:
    select XMLQUERY('
    declare function local:one($arg) {
    1
    local:one(.)
    passing (XMLTYPE('&lt;dummy /&gt;')) returning content) from dual;
    I get, instead:
    ERROR: ORA-01756: quoted string not properly terminated
    By entering the statement line by line, I see that the error is raised when reaching the "};". I'm sure this XQuery statement is correct (I've validated it in OxygenXML). What am I doing wrongly?
    Thanks for your help!

    add (: :) after };
    semicolon is the sql terminator.

  • XMLQuery fails when executed as a job

    Hi all,
    I build a query that checks the data server connections, using the string
    server://XMII/Illuminator?Service=SystemInfo&Mode=Status&Content-Type=text/xml
    The query works fine by itself and executed in a BLS. However, when I schedule the BLS, NetWeaver Log shows an error:
    Error Processing XMLQuery A remote host refused an attempted connect operation
    ...ACTION FAILED: End Action XML_listConnectStatus : (XML Query)
    I tried to supply user and pw to the job, or pass it as parameter to the query, but the error remains. I also tried to use the "http...<server>:<port>" prefix instead of "server", but the error does not disappear. What is the difference when calling it from workbench or as a job?
    Michael

    Rick,
    that solved it.
    I used the following:
    - TAG query
    - Simulator as Data Server
    - save query without further settings
    - define a BLS with this TAG query
    - Link Mode=Status and Service=SystemInfo
    The result set is a XML which can be processed.
    Thanks and Merry Christmas.
    Michael

  • ORA-01780: string literal required ( ERROR at line 7:)

    Can anyone help me ?
    The XMLQuery below show me ORA-01780:
    with t as (
    select xmltype('<Root>
    <Child1 attribute1=''1'' attribute2=''2''></Child1>
    <Child1 attribute1=''3'' attribute2=''4''></Child1>
    <Child1 attribute1=''5'' attribute2=''6''></Child1>
    <Child1 attribute1=''2'' attribute2=''1''></Child1>
    </Root>') xml from dual )
    SELECT warehouse2.attribute1
    , warehouse2.attribute1
    FROM warehouses
    , XMLTABLE('/Root'
    PASSING t.xml
    COLUMNS
    attribute1 varchar2(1) PATH '/Root/Child1/@attribute1',
    attribute2 varchar2(1) PATH '/Root/Child1/@attribute2') warehouse2;
    SQL>
    SQL> </Root>') xml from dual )
    SQL> *
    SQL> ERROR at line 7:
    SQL> ORA-01780: string literal required

    wrong "table"
    [oracle@apex00 ~]$ sqlplus system/manager
    SQL*Plus: Release 11.1.0.6.0 - Production on Thu Apr 22 17:11:50 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    SQL> with t as (
      2  select xmltype('<Root>
      3  <Child1 attribute1=''1'' attribute2=''2''></Child1>
      4  <Child1 attribute1=''3'' attribute2=''4''></Child1>
      5  <Child1 attribute1=''5'' attribute2=''6''></Child1>
      6  <Child1 attribute1=''2'' attribute2=''1''></Child1>
      7  </Root>') xml from dual )
      8  SELECT warehouse2.attribute1
      9  , warehouse2.attribute1
    10  FROM warehouses
    11  , XMLTABLE('/Root'
    12  PASSING t.xml
    13  COLUMNS
    14  attribute1 varchar2(1) PATH '/Root/Child1/@attribute1',
    15  attribute2 varchar2(1) PATH '/Root/Child1/@attribute2') warehouse2;
    FROM warehouses
    ERROR at line 10:
    ORA-00942: table or view does not exist
    SQL> with t as (
      2  select xmltype('<Root>
      3  <Child1 attribute1=''1'' attribute2=''2''></Child1>
      4  <Child1 attribute1=''3'' attribute2=''4''></Child1>
      5  <Child1 attribute1=''5'' attribute2=''6''></Child1>
      6  <Child1 attribute1=''2'' attribute2=''1''></Child1>
      7  </Root>') xml from dual )
      8  SELECT warehouse2.attribute1
      9  ,      warehouse2.attribute1
    10  FROM   t --<< so not warehouses >>--
    11  ,      XMLTABLE('/Root'
    12                  PASSING t.xml
    13                  COLUMNS
    14                    attribute1 varchar2(1) PATH '/Root/Child1/@attribute1',
    15                    attribute2 varchar2(1) PATH '/Root/Child1/@attribute2') warehouse2
    16 ;
    A A
    1 1
    1 row selected.

Maybe you are looking for

  • Failover to Physical Standby

    Hi All, I have a configured data guard  in my local system . Please find the below configuration of the Data guard Data Guard Type : - Physical Standby (Oracle version 11g) Service Responsible for Log Transport : - ARCH No Standby Redo log : - Neithe

  • Adobe Lightroom Will Not Run.....Help

    I am trying to run the Windows XP version of Adobe Lightroom 1.0 on a Pentium 4 system with 1.5GB or RAM that meets all the system requirements. After installation the title screen comes up and then gives the error message Adobe Photoshop Lightroom e

  • Event Notification Service

    I am running Messaging server 6. Is it possible to have ENS send a notification to a external email address(outside my email domain) when a new message is recieved in the users mailbox?

  • Error Installing new versions of iTunes

    Whenever I attempt to install a newer version of iTunes (7.2 and higher) I get an error message, "C:\ProgramFiles\iTunes\iTunes.Resouces\fi.lproj\iPodSettings.nib\classes.nib Verify that you have access to that directory." I don't know what it means

  • Continously data collection and events

    Hi Folks, I need a suggestion about how to get DATA continously and trigger another events simultaneously . Here is my vi snippet with continously monitoring the motor value and direction but wanna trigger and change it movement in rel and abs. I als