Err: ORA-31011: failed to parse XML

Hello

While inserting the XML code in the table, I faced slot problem, Pls suggest a way out of the code.
Your help is appreciate.
I'm using the version of Oracle - 10.2.0.2.0

Err: ORA-31011: failed to parse XML
ORA-19202: an error has occurred in the processing of XML
LPX-00234: the 'xsi' namespace prefix is not declared
Error on line 1
ORA-06512: at "SYS." XMLTYPE", line 254
ORA-06512: at line 1

-Step 1
CREATE TABLE EMP (EMPCODE NUMBER (8), EMPNAME VARCHAR2 (100), THE NUMBER OF EMPDEPTNO (8), NUMBER EMPSAL (34.2));
/
-Step 2
BEGIN
FOR X IN (SELECT * FROM USER_OBJECTS S WHERE ROWNUM < = 50)
LOOP
INSERT INTO VALUES EMP (X.OBJECT_ID, X.OBJECT_NAME, 20, X.OBJECT_ID + 10);
END LOOP;
COMMIT;
END;
/
-Step 3
create the table EMPXML (XMLCLOB XMLTYPE);
/
-Step 4
DECLARE
v_xmldata CLOB.
v_tmpdata CLOB.
v_xmltype XMLTYPE.
BEGIN
DBMS_LOB.CREATETEMPORARY (v_tmpdata, false);
v_xmldata: = ' <? XML version = "1.0" encoding = "UTF-8"? > ';

SELECT Xmlelement ("employee",

XmlAttributes ("http://ns.oracle.com.tw/XSD/ORACLE/ESB/Message/EMF/ServiceEnvelope" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" AS ")
"xmlns:ns0,"
' http://ns.oracle.com.tw/XSD/ORACLE/ESB/Message/EMF/ServiceEnvelope ServiceEnvelope.xsd > ' AS
("xsi: schemaLocation").
XMLAGG (Xmlforest (AS Empcode "EmpID",
EmpName AS "EmpName",.
Empsal AS 'EmpSal'))) BY v_xmltype
FROM Emp
WHERE Empdeptno = 20;

SELECT v_xmltype.getCLOBVal () IN the v_tmpdata FROM dual;

DBMS_LOB. Append (v_xmldata, v_tmpdata);

BEGIN
INSERT IN EMPXML VALUES (xmltype (v_xmldata));
EXCEPTION WHEN OTHERS THEN
dbms_output.put_line ('Err: ' |) SQLERRM);
END;
END;
/
-Step 5
SELECT * from empxml;
/
-Step 6
DROP TABLE EMP PURGE;
/
-Step 7
DROP TABLE EMPXML PURGE;
/
Thank you and best regards,
Yogesh Nagle
India

What? Pepijn you provided the correct use of Xmlattributes and showed that your script would go without errors. What is the problem with his answer or it does not that you need it?

Tags: Oracle Development

Similar Questions

  • Failed to parse XML

    Hello

    If I use the following XML code it does not produce anything. Please help me to find what the problem is.
    [PHP]
    var XML = < xml >
    " < manifest xmlns =" http://www.imsglobal.org/XSD/imscp_v1p1 "xmlns:imsmd =" " http://www.imsglobal.org/XSD/imsmd_v1p2 "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "xsi: schemaLocation =" http://www.imsglobal.org/XSD/imscp_v1p1 http://www.imsglobal.org/xsd/imscp_v1p1.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 http://www.imsglobal.org/xsd/imsmd_v1p2.xsd "identifier="Manifest7-CEC3D3-3201-DF8E-8F42-3CEED12F4197"version ="IMS CP 1.1.4">
    < text > < / text >
    < / manifesto >
    < / xml >;

    trace (XML.manifest.Text) [PHP]

    It does not produce anything on the screen. Any help is appreciated.

    The IMS, overall it is wisdom, mucked with the default namespace in the scorm doc set. Should be a simple workaround to resolve. Take a look at this:

    var nsIMS:Namespace = new Namespace ("http://www.imsglobal.org/xsd/imscp_v1p1");

    the ns ims default
    default xml namespace = nsIMS;
    var xml =
         "http://www.imsglobal.org/XSD/imscp_v1p1" xmlns:imsmd ="http://www.imsglobal.org/xsd/imsmd_v1p2" "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xsi: schemaLocation ="http://www.imsglobal.org/xsd/imscp_v1p1http://www.imsglobal.org/xsd/imscp_v1p1.xsdhttp://www.imsglobal.org/xsd/imsmd_v1p2http://www.imsglobal.org/xsd/imsmd_v1p2.xsd "identifier="Manifest7-CEC3D3-3201-DF8E-8F42-3CEED12F4197"version ="IMS CP 1.1.4">
             Text
        

    ;

    trace ("ims def ns:", xml.manifest.text);

    the ns by default to a null value when the value

    lack of namespace xml = null;

    trace ("null def ns:", xml.manifest.text);

  • ORA-31011: XML parsing failed

    Hello

    Currently I am passing the sql SELECT query * table to this API oracle returns XML data into a clob.

    I have a column in DB which, once certain error over a value that contains an unprintable character. Its not visible directly on sqlplus then I ran the query to find its value ascii() and it turns out be ASCII 4 which is EOT [end of transmission]

    dbms_xmlgen. GetXml is isn't able to manipulate and generate the XML from this table. His throw ORA-31011: failed to parse XML.

    I know that you can use regxp_replace as in the following example to remove all control characters (that is, non-printable characters):

    SELECT DBMS_XMLGEN.
            getxml (
              'select regexp_replace(empno,''[:cntrl:]'') empno, ename, job, mgr, hiredate, sal, comm, deptno  from emp')

      FROM DUAL;

    But, this also removes the feedback tab and transport, I need to keep.

    What is needed is a set of characters (for example, [: xml :]) that can be used with regexp to return all valid XML characters.])

    No idea how to remove all non - xml characters elegantly (i.e. without having to specify the ranges of hexadecimal characters, etc..)?

    You need to delete ASCII 1-8, 11,12,14-31 and 39, so I doubt that ' elegantly '.

    Here is an example of work with regexp_replace and (clumsy) beaches. There is no more an EXCEPTION with the high-end:

    DECLARE
      ostr  VARCHAR2(50);
      nstr  VARCHAR2(50);
      xstr CLOB;
    BEGIN
      FOR i IN 1..255 LOOP
      BEGIN
        ostr := chr(i);
        nstr := regexp_replace(ostr,'['||chr(1)||'-'||chr(8)||']|['||chr(11)||'-'||chr(12)||']|['||chr(14)||'-'||chr(31)||chr(39)||']','#');
        SELECT DBMS_XMLGEN.getxml ('SELECT '||i||' i, '''||nstr||''' str  FROM dual') INTO xstr  FROM dual;
        --dbms_output.put_line(xstr);
      EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line(i);
      END;
    END LOOP;
    END;        
    
  • ORA-31011: analysis XML has not, someone can like me wats wrong in this code

    Hi all

    I am trying to parse an XML document, for which I wrote a code on the XML parsing.

    I'm moving to an XML document, which will be in a format, I can't change that.

    Now, I have to get values to individual items such as FROM_USERID and TO_USERID, and MESSAGE.

    Here is the code

    create or replace procedure myparsing is
    new_msg_str varchar2 (4000);
    XMLType new_msg_xml;
    v_from_user varchar2 (8);
    v_to_user varchar2 (8);
    v_msg_tmp varchar2 (4000);
    v_msg varchar2 (4000);
    payloadxml varchar2 (2000);
    Chat.objmessage_typ MyMsg;
    n number;

    getvalueat function)
    NodeList dbms_xmlDom.DOMNodeList, xPath varchar2)
    VARCHAR2 is back
    Start
    Return to dbms_xslprocessor.valueOf (dbms_xmldom.item(nodelist,2),
    XPath);
    end getvalueat;

    analysis of procedure (xmlpayload varchar2) is
    doc dbms_xmlDom.DOMDocument.
    parser dbms_xmlparser. Analyzer;
    nodeList dbms_xmlDom.DOMNodelist;
    Testdoc varchar2 (2000);
    Start
    Parser: = dbms_xmlparser.newParser;
    dbms_xmlparser.parseBuffer (parser, xmlPayload);
    doc: = dbms_xmlparser.getDocument (parser);
    dbms_xmlparser.freeParser (parser);
    nodeList: = dbms_xslprocessor.selectNodes)
    dbms_xmlDom.makeNode (doc),'/ CAT. OBJMESSAGE_TYP');
    MyMsg: = objmessage_typ (null, null, null);
    MyMsg.from_userid: = getValueAt (nodeList, 'FROM_USERID');
    MyMsg.to_userid: = getValueAt (nodeList, 'TO_USERID');
    MyMsg.message: = getValueAt (nodeList, 'MESSAGE');
    end analysis;

    Start
    payloadXml: = ' <? XML version = "1.0"? >

    < CAT > OBJMESSAGE_TYP > < FROM_USERID > abcdabcd < / FROM_USERID >

    me < TO_USERID > < / TO_USERID > < MESSAGE > HI this IS SOME

    MESSAGE < / MESSAGE > < / CAT. OBJMESSAGE_TYP > ';
    Parse (payloadXml);
    v_from_user: = mymsg.from_userid;
    v_to_user: = mymsg.to_userid;
    v_msg: = mymsg.message;
    MyMsg: = objmessage_typ (null, null, null);
    v_from_user: = ";
    v_to_user: = ";
    v_msg: = ";
    end;


    I get the error message

    SQL > start
    2 myparsing();
    3 end;
    4.
    Start
    *
    ERROR on line 1:
    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00231: invalid character 46 ('.) ') in a name a Nmtoken
    Error on line 4
    ORA-06512: at "XDB". DBMS_XMLPARSER', line 156
    ORA-06512: at "CAT. MYPARSING', line 27
    ORA-06512: at "CAT. MYPARSING', line 43
    ORA-06512: at line 2


    Can someone like me whats wrong in this code and the things I need to do

    TIA...

    It is not valid XML.

    See [spec | http://www.w3.org/TR/xml/#sec-starttags]

    Disallowed initial characters for Names include digits, diacritics, the full stop and the hyphen
    
  • Parse XML and insert into the table Oracel

    Hi all

    I have an XML document, I need to analyze and take the respective tag data and inserting it into another table.

    This is the XML code that I have.

    " < convertTo xsi: schemaLocation =" https://xecdapi.XE.com/schema/v1/convertTo.xsd "> "

    < terms > http://www.XE.com/privacy.php < / terms >

    < privacy > http://www.XE.com/legal/DFS.php < / privacy >

    < to > < /pour > USD

    < amount > 1.0 < / amount >

    < timestamp > 2015-10-25T 23: 00:00Z < / timestamp >

    < from >

    rate <>

    < currency > EUR < / currency >

    < e > 0.9075541422 < / mid >

    < / rates >

    rate <>

    INR < currency > < / currency >

    < e > 65.0313451105 < / mid >

    < / rates >

    rate <>

    < currency > CAD < / currency >

    < e > 1.3167560135 < / mid >

    < / rates >

    rate <>

    < currency > GBP < / currency >

    < e > 0.6528693249 < / mid >

    < / rates >

    < / from >

    < / convertTo >


    Here is the code I use to analyze the values

    DECLARE

    XMLType x: = XMLType)

    ' ' < convertTo xsi: schemaLocation = " https://xecdapi.XE.com/schema/v1/convertTo.xsd "> "

    < terms > http://www.XE.com/privacy.php < / terms >

    < privacy > http://www.XE.com/legal/DFS.php < / privacy >

    < to > < /pour > USD

    < amount > 1.0 < / amount >

    < timestamp > 2015-10-25T 23: 00:00Z < / timestamp >

    < from >

    rate <>

    < currency > EUR < / currency >

    < e > 0.9075541422 < / mid >

    < / rates >

    rate <>

    INR < currency > < / currency >

    < e > 65.0313451105 < / mid >

    < / rates >

    rate <>

    < currency > CAD < / currency >

    < e > 1.3167560135 < / mid >

    < / rates >

    rate <>

    < currency > GBP < / currency >

    < e > 0.6528693249 < / mid >

    < / rates >

    < / from >

    < / convertTo > '

    );

    BEGIN

    FOR r IN

    (

    SELECT

    Name of the AS ExtractValue (Value (p),'/ rate/currency/text () ')

    -, ExtractValue (value (p), '/ Row/Address/State/Text ()') State

    -, ExtractValue (value (p), '/ Row/Address/City/Text ()') city

    Of

    TABLE (XMLSequence (Extract(x,'convertTo/from/rate'))) p

    )

    LOOP

    -do what you want with r.name, r.state, r.city

    dbms_output.put_line ('Name' | r.Name);

    END LOOP;

    END;

    I get the error message below

    Error report:

    ORA-31011: XML parsing failed

    ORA-19202: an error has occurred in the processing of XML

    LPX-00234: the 'xsi' namespace prefix is not declared

    Error on line 1

    ORA-06512: at "SYS." XMLTYPE", line 310

    ORA-06512: at line 2

    31011 00000 - "XML parsing failed"

    * Cause: XML parser returned an error trying to parse the document.

    * Action: Check whether the document to parse is valid.

    Any help on how to fix this would be really useful.

    Appreciate your time and your help.

    Thank you

    Olivier

    Have you even tried to do what we have suggested?

    SQL > ed
    A written file afiedt.buf

    1 with t as (select xmltype ('))
    "" 2 http://xecdapi.xe.com "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"" xsi: schemaLocation = "https://xecdapi.xe.com/schema/v1/convertTo.xsd" > ""
    3 http://www.xe.com/privacy.php
    4 http://www.xe.com/legal/dfs.php
    5 USD
    6    1.0
    7 2015-10 - 25 T 23: 00:00Z
    8
    9
    10 EUROS
    11 0.9075541422
    12

    13

    14
    ") in XML of the double)"
    15-
    16 end of test data
    17-
    18 select x.*
    19 t
    20, xmltable (xmlnamespaces ("http://www.w3.org/2001/XMLSchema-instance" as "xsi", default 'http://xecdapi.xe.com'),)
    21 ' / convertTo/of/rate.
    22 passage t.xml
    path of VARCHAR2 (3) currency 23 columns '. / currency '
    24, half-way number '. / mid'
    25*                ) x
    SQL > /.
    HEART MI
    --- ----------
    EUR.907554142

    1 selected line.

  • ORA-31011 when using XMLElement.getblobval)

    Hi all

    We have recently updated our server Oracle of Oracle Database 10 g Release 10.2.0.2.0 - Production of Oracle Database 10 g Release 10.2.0.5.0 - Production, and now we are getting the following error in one of our procedures in XML.

    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00230: invalid 0 (U + 0000) character in a name a Nmtoken
    Error on line 1
    ORA-06512: at "SYS." XMLTYPE", line 156

    I found 2 things, the first is that if I delete as 8 characters of XMLElement that is ITI selected fine works, so my guess is that the value is too large, but to dig deeper the problem I discovered at the end of XMLElement there is a .getBlobVal (1), so when noting that I get no error.

    no idea why this phenomenon occurs? is this something related to the nls_character_Set? I tried with others with no luck

    Thanks in advance
  • DBMS_XSLPROCESSOR. FREESTYLESHEET, freeing not? ORA-31011

    Hi Chaps,

    Could do with a second pair of eyes on this one.

    I have a problem with this piece of code under which is a test case artificial to demonstrate a problem elsewhere.

    This seems to be a problem on 9.2.0.7.

    It will also depend on OS limits on open files.
    DECLARE
          p_XMLData  CLOB :=
    '<MessageData><DataItem Name="Price"><DataField Current="ca747a56-b2d9-43e6-b0f3-8d4ee379e76a" Old="" Name="PriceGuid" DataType="System.Guid" /><DataField Current="ef1e0f12-6b09-406c-811e-92389df39c27" Old="" Name="InstrumentGuid" DataType="System.Guid" /><DataField Current="31.07.2008 00:00:00.000" Old="" Name="AsOfDate" DataType="System.DateTime" /><DataField Current="True" Old="" Name="IsRor" DataType="System.Boolean" /><DataField Current="1024.46454240" Old="" Name="Nav" DataType="System.Decimal" /><DataField Current="0.03200000" Old="" Name="Ror" DataType="System.Decimal" /><DataField Current="40" Old="" Name="QualityID" DataType="System.UnsignedByte" /><DataField Current="" Old="" Name="Note" DataType="System.String" /><DataField Current="False" Old="" Name="IsDeleted" DataType="System.Boolean" /><DataField Current="False" Old="" Name="IsPropagated" DataType="System.Boolean" /><DataField Current="PCS Replication" Old="" Name="CreatedBy" DataType="System.String" /><DataField Current="04.08.2008 08:54:35.287" Old="" Name="CreatedTime" DataType="System.DateTime" /><DataField Current="04.08.2008 06:54:35.287" Old="" Name="CreatedTimeUTC" DataType="System.DateTime" /><DataField Current="dhilbert" Old="" Name="UpdatedBy" DataType="System.String" /><DataField Current="04.08.2008 17:07:14.637" Old="" Name="UpdatedTime" DataType="System.DateTime" /><DataField Current="04.08.2008 15:07:14.637" Old="" Name="UpdatedTimeUTC" DataType="System.DateTime" /><DataField Current="5" Old="" Name="InputTypeID" DataType="System.UnsignedByte" /><DataField Current="" Old="" Name="ReconciliationGuid" DataType="System.Guid" /><DataField Current="" Old="" Name="CounterPartyAccountID" DataType="System.String" /><DataField Current="2" Old="" Name="Brands" DataType="System.String" /><DataField Current="" Old="" Name="PitaID" DataType="System.String" /><DataField Current="" Old="" Name="FirstID" DataType="System.String" /><DataField Current="shs25655" Old="" Name="ShortID" DataType="System.String" /></DataItem></MessageData>';
          p_XSLData  CLOB := 
    '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz</xsl:variable>
    <xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
        <xsl:output indent="yes" method="xml"/>
        <xsl:template match="DataItem">
            <xsl:element name="{translate(@Name,$lcletters,$ucletters)}">
                <xsl:for-each select="DataField">
                    <xsl:element name="{translate(@Name,$lcletters,$ucletters)}">
                        <xsl:value-of select="@Current"/>
                    </xsl:element>
                </xsl:for-each>
            </xsl:element>
            <xsl:apply-templates/>
        </xsl:template>
    </xsl:stylesheet>';
          v_XMLParser               DBMS_XMLPARSER.Parser;
          v_XMLDOMDocument          DBMS_XMLDOM.domdocument;
          v_XSLDOMDocument          DBMS_XMLDOM.domdocument;
          v_XSLSytlesheet           DBMS_XSLPROCESSOR.stylesheet;
          v_OutputDOMDocumentFrag   DBMS_XMLDOM.domdocumentfragment;
          v_OutputNode              DBMS_XMLDOM.domnode;
          v_XSLProcessor            DBMS_XSLPROCESSOR.processor;
          v_TransformedXMLData      CLOB := empty_clob();
          l1 pls_integer;
       BEGIN
          DBMS_LOB.CREATETEMPORARY(v_TransformedXMLData,FALSE,DBMS_LOB.CALL);
          FOR i in 1 .. 10000
          LOOP
             -- Get the new xml parser instance
             v_XMLParser := DBMS_XMLPARSER.newParser;
             -- Parse the XML document
             DBMS_XMLPARSER.parseClob( v_XMLParser, p_XMLData );
             -- Get the XML's DOM document
             v_XMLDOMDocument := DBMS_XMLPARSER.getDocument( v_XMLParser );
             -- Parse the XSL document
             DBMS_XMLPARSER.parseClob( v_XMLParser, p_XSLData );
             -- Get the XSL's DOM document
             v_XSLDOMDocument := DBMS_XMLPARSER.getDocument( v_XMLParser );
             -- Get the stylesheet
    --Comment out this line BELOW
             v_XSLSytlesheet := DBMS_XSLPROCESSOR.newstylesheet( v_XSLDOMDocument, '' );
    --Comment out this line ABOVE
             -- Get the new xsl processor instance
             v_XSLProcessor := DBMS_XSLPROCESSOR.newProcessor;
             -- Apply stylesheet to DOM document
             v_OutputDOMDocumentFrag := DBMS_XSLPROCESSOR.processxsl( v_XSLProcessor,
                                                                      v_XSLSytlesheet,
                                                                      v_XMLDOMDocument );
             v_OutputNode := DBMS_XMLDOM.makenode( v_OutputDOMDocumentFrag );
             -- Write the transformed output to the CLOB
             --
             DBMS_XMLDOM.writetoCLOB( v_OutputNode, v_TransformedXMLData );
             --
             DBMS_XMLDOM.FREENODE(v_outputnode);
             --
             DBMS_XMLDOM.FREEDOCFRAG(v_OutputDOMDocumentFrag);
             --
             DBMS_XSLPROCESSOR.FREESTYLESHEET(v_XSLSytlesheet);
             --
             DBMS_XSLPROCESSOR.FREEPROCESSOR(v_xslprocessor);
             --
             DBMS_XMLDOM.FREEDOCUMENT(v_xmldomdocument);
             --
             DBMS_XMLDOM.FREEDOCUMENT(v_xsldomdocument);
             --
             DBMS_XMLPARSER.FREEPARSER(v_xmlparser);
             --
          END LOOP;
       END;
    /
    On my 9.2.0.7 database this success an ORA-31011 with a large number of loops.
    Then, the session cannot continue due to issues of "too many open file:
    "ORA-27041: could not open the file.
    Error of HP - UX: 24: too many open files
    "Additional information: 3"

    If I comment the line
    v_XSLSytlesheet := DBMS_XSLPROCESSOR.newstylesheet( v_XSLDOMDocument, '' );
    then there is no error.

    The conclusion is that something is not freed up - the stylesheet or an object-dependent.
    But it seems to me that everything is cleaned.

    Can anyone otherwise reproduce on 9.2.0.7 or spot something obvious about cleaning?

    See you soon,.
    Dominic

    Published by: dombrooks on October 1st, 2008 12:14

    Published by: dombrooks on October 1st, 2008 12:14
    removed erroneous call to DBMS_LOB. FREETEMPORARY

    In principle, you hit a limit at the level of the nucleus (HP - UX). You were not allowed to open new processes fork. There are some kernel parameters that control the maximum amount of sessions by machine and unix user. Search on Internet of the "unauthorized to the fork" and you will find problems with, for example, "nfile" etc. settings...

  • Parsing XML and get the attributes of a tag

    Hello

    When parsing XML for application of Cascades in C++, I am able to get the value of a tag as follows:

    00000

    But I also want to get the attributes of a tag:

    But I don't know how to get the 'CA' and 'California' attributes with my current code.  Can anyone help?  Here is the code I use to parse the XML code:

    void CMController::requestFinished(QNetworkReply* reply) {
    
        if (reply->error() == QNetworkReply::NoError) {
    
            QXmlStreamReader xml;
    
            QByteArray data = reply->readAll();
            xml.addData(data);
    
            QString zip;
            QString id;
            QString location;
    
            while (!xml.atEnd() && !xml.hasError()) {
    
                /* Read next element.*/
                QXmlStreamReader::TokenType token = xml.readNext();
    
                /* If token is just StartDocument, we'll go to next.*/
                if (token == QXmlStreamReader::StartDocument) {
                    continue;
                }
    
                /* If token is StartElement, we'll see if we can read it.*/
                if (token == QXmlStreamReader::StartElement) {
    
                    if (xml.name() == "zip") {
                        zip = xml.readElementText();
                    }
    
                    if (xml.name() == "id") {
                        ???
                    }
    
                    if (xml.name() == "location") {
                        ???
                    }
    
                }
    
            }
    
            emit succeeded(result);
    
        } else {
            emit failed();
        }
    
        reply->deleteLater();
    
    }
    

    Thank you!

    I found a working example:

    if(xml.name() == "state"){
        QXmlStreamAttributes attrib = xml.attributes();
        QStringRef ref = attrib.value("location");
        qDebug() << "location: " << ref;
    }
    
  • Failed to parse the SQL query by user

    Hi all

    in my application, I have a piece of text with a button "submit". In this article, I type a name and a report after the element region show me the result (s). This works for all my users (> 2000) perfectly, but that users become an error in the area of the report:

    Failed to parse the SQL query:
    ORA-01403: no data found

    We try this with the same searchstring on the same computer/browser. If I connected the result is ok, if the logged on user, the error message appears. If I try this on the user's computer with me connected, ok result. If the user try this on another pc, error results.

    I have a production and a developer workspace. In the developer workspace the user can try this perfectly without errors. That in the space of productive work, clear the error.

    The SQL-Select in the ist verry simple reprirt:

    Select id
    name
    raum
    table
    where instr (upper (name), upper (:P60_SEARCH)) > 0

    However, all users can use this search box with report perfectly, only this one user has the error. There is no restrictions on this point or a State.

    Can someone help me?

    Hi Carsten,

    I don't think that there is a way to do it.

    Could you please mark the correct and useful answers in this thread? Otherwise I'll never get near Andy ;) :)

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • ORA-28112: failed to perform the function of guidance - error in the Application Builder

    Hey all,.

    I added a political function to one of my paintings, and now I get this error when I try to update a report region that refers to this table.

    "The query cannot be parsed into the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. "ORA-28112: failed to perform the function of guidance."

    If I remove the policy then everything works fine. My application works well with the policy in place. I just get these errors in the application builder when refreshing a report or a LOV that references the secured table.

    The analysis schema is APPL_USER.

    Here's the political function:

    FUNCTION DOCUMENT_TABLE_POLICY (object_schema IN VARCHAR2 DEFAULT NULL
    object_name IN VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2 IS
    v_nt_seq NUMBER;
    BEGIN
    IF use = "APPL_USER" or INSTR(user, 'ITFC_') = 1 THEN
    RETURNS A NULL VALUE.
    END IF;

    IF V ('APP_USER') IS NOT NULL THEN
    IF V ('F_NT_SEQ') IS NOT NULL THEN
    v_nt_seq: = V ('F_NT_SEQ');
    ON THE OTHER
    SELECT NT_SEQ
    IN v_nt_seq
    OF APPL_USERS
    WHERE UPPER (NT_ID) = UPPER (V ('APP_USER'));
    END IF;

    RETURN ' (DOCUMENT_TYPE, MANAGED_BY_ELEMENT, PROGRAM_CODE, CONTRACT_NUMBER) IN (SELECT DISTINCT R.DOCUMENT_TYPE, USL. ELEMENT, USL. PROGRAM_CODE, USL. CONTRACT_NUMBER OF USL, R IPRACA_SECURITY_ROLES IPRACA_USERS_SECURITY_LINK WHERE R.SECURITY_ROLE_SEQ = USL. SECURITY_ROLE_SEQ AND USL. NT_SEQ = ' | To_char (v_nt_seq) | ')';
    END IF;

    -UNAUTHORIZED USERS CANNOT SEE ANY DATA
    RETURN '1 = 0';
    END;

    This is how to set up the policy:

    BEGIN

    DBMS_RLS. () ADD_POLICY
    object_schema = > 'APPL_USER '.
    , object_name = > 'APPL_DOCUMENT '.
    , policy_name = > 'APPL_DOCUMENT_POLICY '.
    , function_schema = > 'APPL_USER '.
    , policy_function = > ' APPL_SECURITY. DOCUMENT_TABLE_POLICY'
    );

    END;


    Any help would be greatly appreciated!

    Thank you

    Jonathan Hart
    APEX 3.1.1

    It is possible that this raises an exception:

    SELECT NT_SEQ
    IN v_nt_seq
    OF APPL_USERS
    WHERE UPPER (NT_ID) = UPPER (V ('APP_USER'));

    Is there a line in APPL_USERS where NT_ID = ?

    Scott

  • failed to parse

    win xp, HP all in one single 2175

    failed to parse, or no communication with the driver for scanning.

    reinstalled the software for the HP device

    Doctor HP: only WIA is in order

    The software that I use to keep my cleaned registry is free from a company called iObit.  The tool is called the Advanced System Care.  The software is third, it's up to you if you want to use it, but I use the free version at work and the paid version at home, to keep my PC, cleaned registry and have not had any problems with both versions.  Here a link to the site where you can get it.  If you're not comfortable software download that you are not familiar with, then I suggest to ask someone trust you who is good with the PC if they know of a program that can clean your registry for you.  Other that that, you may need to pay someone to clean it up.  Uninstall the printer software before you clean the registry, so that cleaning can get all the files, get rid of that.  If uninstalling, cleaning the registry and reinstall does not, correct it let me know.

  • Problem in parsing XML

    Hello

    Any1 can you please tell me how to do Xml parsing in Blackberry. I'm a bit confused by it.

    Assume that it is my link:

    {keyword: "keword", url: "videoUrl"}

    While parsing xml:

    String keyword1 ="";

    element.getName.equalsIgnoreCase ("keyword");

    keyword1 = Element.GetText ();

    is she writing?

    Hey its done.

  • Widget to the Web service, parsing XML

    I worked on the communication with my web services and back to my widget.

    By using the code below, I was able to perform a GET and repay the XML, but I can't find data where I expect it to be node-wise when parsing XML. I return an object with 3 variables attached to it. I expect to be child nodes 1, 2, and 3. They proved to be 1, 3 and 5 nodes.

    Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    XML response

    
    - http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
      1000
      Test Station
      105.285
      
    

    The widget code

    //****************** Ajax Logic ******************
    var xmlHttp;
    function getStationUpdate() {
    
        alert("in station update");
        xmlHttp = new XMLHttpRequest();
    
        var Posturl = "http://MachineIPGoesHERE:51107/Service1.asmx/HelloWorld2?";
        alert("after post url");
        xmlHttp.onreadystatechange = updateData;
        alert("after onReadyStateChange");
        xmlHttp.open("GET", Posturl, true);
        alert("after GET");
    
        xmlHttp.send(null);
    }
    
    function updateData() {
        if (xmlHttp.readyState == 4) {
            alert(xmlHttp.responseText);
            parser = new DOMParser();
            var xmlDoc = parser.parseFromString(xmlHttp.responseText, "text/xml");
    
            alert(xmlDoc.documentElement.childNodes[1].tagName + " " + xmlDoc.documentElement.childNodes[1].childNodes[0].nodeValue);
            //alert(xmlDoc.documentElement.childNodes[1].childNodes.length);
            //alert(xmlDoc.documentElement.childNodes[1].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].tagName + " " + xmlDoc.documentElement.childNodes[2].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[3].tagName + " " + xmlDoc.documentElement.childNodes[3].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[5].tagName + " " + xmlDoc.documentElement.childNodes[5].childNodes[0].nodeValue);
    
            alert(xmlDoc.documentElement.childNodes.length);
        }
    

    Web service

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Xml.Serialization;
    
    namespace WebService1
    {
        /// 
        /// Summary description for Service1
        /// 
        [WebService(Namespace = "http://tempuri.org/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [System.ComponentModel.ToolboxItem(false)]
        // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
         [System.Web.Script.Services.ScriptService]
        public class Service1 : System.Web.Services.WebService
        {
    
            [WebMethod]
            public string HelloWorld()
            {
                return "Hello World";
            }
    
            [WebMethod]
            public myTestObj HelloWorld2()
            {
                myTestObj test = new myTestObj();
                return test;
            }
        }
    
        [Serializable]
        public class myTestObj
        {
            private int _StationID;
            private string _StationName;
            private double _Volume;
    
            [XmlElementAttribute(Order = 0)]
            public int StationID
            {
                get
                {
                    return this._StationID;
                }
                set
                {
                    this._StationID = value;
                }
            }
    
            [XmlElementAttribute(Order = 1)]
            public string StationName
            {
                get
                {
                    return this._StationName;
                }
                set
                {
                    this._StationName = value;
                }
            }
    
            [XmlElementAttribute(Order = 2)]
            public double Volume
            {
                get
                {
                    return this._Volume;
                }
                set
                {
                    this._Volume = value;
                }
            }
    
            public myTestObj()
            {
                StationID = 1000;
                StationName = "Test Station";
                Volume = 105.285;
            }
        }
    }
    

    > Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    White space nodes?

  • Store functions/procedures in BI Publisher - failed to load XML

    Hello world

    I am trying to call a function to return a set of rows with BI Publisher. When I want to look at the data on the 'Data' tab, I get "Failed to load XML".

    Here are the steps I took:

    Step 1: created a type

    create type numset_t as table of number;
    

    Step 2: Creating the function

    create or replace function f1(x number) return numset_t pipelined is
    begin
    for i in 1..x loop
    pipe row(i);
    end loop;
    return;
    end;
    

    Step 3: Under "Data sets", I created a SQL query with the following options/code

    Code:

    select * from table(f1(3))
    

    Options: Data Source - my selected schema

    SQL type: Non-standard SQL

    Name of tag line: test

    How can I check my data using the button "data"?

    Thank you

    Here's the steps/documentation on how to call a function from BI Publisher:

    #1) make sure you use SYS_REFCURSOR.

    (#2) create your function as below:

    CREATE OR REPLACE FUNCTION FUNC1 (P1 VARCHAR2) RETURN SYS_REFCURSOR IS
    
       XDO_CURSOR SYS_REFCURSOR;
    BEGIN
     IF P1 = 'USA' THEN
     OPEN XDO_CURSOR FOR
     'SELECT  TO_CHAR(SYSDATE,''MM-DD-YYYY'') AS CURRENT_DATE, X.STATE FROM SchemaName.XX1 X WHERE X.ID IN (100,200,400)';
     RETURN XDO_CURSOR;
     ELSE
     OPEN XDO_CURSOR FOR
     'SELECT  TO_CHAR(SYSDATE,''MM-DD-YYYY'') AS CURRENT_DATE, X.STATE FROM SchemaName.XX1 X WHERE X.ID IN (300,500,600)';
     RETURN XDO_CURSOR;
     END IF ;
    END FUNC1;
    

    (#3) connect as system and grant execute the user to BI

    GRANT EXECUTE ON SchemaName.FUNC1 TO BI_USER;
    

    (#4) under the data model, create a data set with the following (as for example):

    BI requires the variable xdo_cursor as the output, so do not change the name of the variable.

    DECLARE
       type refcursor is REF CURSOR;
       xdo_cursor refcursor;
    BEGIN
       :xdo_cursor := SchemaName.func1(:P1);
    END;
    

    Type of SQL procedure call =

    Thank you. I hope that everything that troubleshoot you.

  • Best way to Parse XML using Dreamweaver CC 2015.3

    I was on a wild goose chase - trying to figure out how to parse XML using DW CC

    every article I read, says something about XML & XSLT, but it is no longer available in the new CC - I read about using jQuery or php, but have not yet find a resource to learn specifically "using DW CC.

    I'm willing to learn how to parse XML with DW CC but I would get a definitive direction to go before I'm trying to learn something that adobe will put in 'end of life '.

    advice or links to resources that can parse XML DW CC 2015 would be LARGELY APPRECIATED, thank you

    x 126 has written:

    What I'm asking is...

    1. What is the best procedure to insert XML into a page using DW CC 2015 as my editor?
    a. what happened to spry? b. what happened to XSLT?

    As Nancy explained, Spry has been abandoned by Adobe, a few years ago.

    XSLT server behavior has been removed at the same time as other server behaviors Dreamweaver CC. The problem with most of the PHP server behaviors was that they were based on code that has been removed from PHP 7. The XSLT server behavior didn't rely on these features, but it was not the most friendly of server behaviors. XSLT is a complex language that is to be avoided when parsing XML unless you really know what you're doing.

    The easiest way to manipulate XML in Dreamweaver should use PHP SimpleXML. I've linked to the samples page in the PHP online documentation. Believe me, it's much easier than trying to do battle with XSLT. If you have a subscription to lynda.com, you can learn more about SimpleXML to my operational with SimpleXMLclass.

Maybe you are looking for

  • Re: How to install Windows on the new Satellite Pro C50 8.1?

    I just bought a TOSHIBA SATELLITE PRO C50, that came with Windows 7 pre-installed. When you start the system for the first time, I simply close and put Windows 8.1 media into the optical drive (disc 1 of 4) then entered the Recovery Wizard and may ha

  • Lenovo Y game surround sound no Sound Headset no sound on the right side

    I am aware there is another topic on this issue, but there has been no response and I wanted necro post the other so the question is as follows: When I test the sound, it is only on the left, and if I try the headphone jack instead of usb, sounds of

  • Equium A200-1VO - replacement DVD player

    Hello I was wondering if someone could help me find a replacement of CD/DVD for a Toshiba Satellite A200-1VO. do I need to export the model exact same DVD player or is there another appropriate drive that works? I know how to mount the drive for the

  • 120W adapter dv6-7014NR?

    The HPShopping site lists #aba as an acceptable charger for dv6-7014NR 120w ve025aa.  But when you look at the map page that the series dv6 is not listed.  Sellers told me that the 120w is NOT acceptable on the dv6-7014, but I'm looking for someone o

  • officejet j6480 again router wireless connection

    We have a j6480 officejet all-in-one and we have recently changed wireless routers and now computers can not find the wireless printer. How do we get computers to recognize the printer or vice versa. Thank you