Problem query of XMLType column in XSQL servlet

Hi all,
I'm having trouble debugging the following error from a query on an XMLType column in an XSQL page query:
<page xmlns:xsql="urn:oracle-xsql" connection="jdbc/DBConnection1DS">
<xsql:query max-rows="1" null-indicator="no">
SELECT extractValue(x.DOCBOOKS_DOC, '/book/part/title', 'xmlns="http://docbook.org/ns/docbook"') "BOOK TITLE"
FROM DOCBOOKS_STORE x
</xsql:query>
</page>
which returns the following error message:
<page>
<ERROR>
oracle.xml.sql.OracleXMLSQLException: Character ' ' is not allowed in an XML tag name.
</ERROR>
</page>
The SQL query works fine in the SQL Worksheet and SQL Plus, only when I stick it in an XSQL query. I've tested the XSQL Page environment with a query on Number Datatype column and no issues there either.
Any suggestions, much appreciated. Thanks.
George

The XML SQL Utility creates XML tags named after your column aliases.
You have aliased the column to a name containing a space: "BOOK TITLE"
This error is telling you that the implied XML element whose name matches this column alias, which would be <BOOK TITLE> is not a legal name for an XML element since it has a space in it.
You'll need to pick a column alias with no space in the name. For example, "BOOK_TITLE" and then in your XSLT stylesheet (or whatever downstream formatting tool you may be using) remove the underscore from the name and replace it with a space.

Similar Messages

  • Problem reading a xmlType column (return only 999 rows) with XMLTable

    Hello,
    I'm new in the forum.
    Sorry for my english.
    I have a problem reading an xmltype column.
    My oracle's version is 11.1.0.6.0
    I have a table like this:
    Create Table TestXml (idProg number, xmldata XmlType)
    XMLTYPE COLUMN xmldata
    STORE AS BINARY XML;
    I have a xml file containing the equivalent of 10000 record (like a csv).
    my schema xsd is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="applicazione">
              <xs:annotation>
                   <xs:documentation>Flusso Monitoraggi</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="periodo" maxOccurs="unbounded">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="segmento" maxOccurs="unbounded">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element name="progressivo" maxOccurs="unbounded">
                                                           <xs:complexType>
                                                                <xs:sequence>
                                                                     <xs:element name="stato" type="xs:string"/>
                                                                     <xs:element name="ts_start" type="xs:string"/>
                                                                     <xs:element name="ts_stop" type="xs:string"/>
                                                                     <xs:element name="nota_esecuzione" type="xs:string"/>
                                                                     <xs:element name="ts_esecuzione" type="xs:string"/>
                                                                </xs:sequence>
                                                                <xs:attribute name="valore" type="xs:integer" use="required"/>
                                                           </xs:complexType>
                                                      </xs:element>
                                                 </xs:sequence>
                                                 <xs:attribute name="nome" type="xs:string" use="required"/>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                                  <xs:attribute name="nome" type="xs:string" use="required"/>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
                   <xs:attribute name="nome" type="xs:string"/>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    When I try to read my xmltype column with this select :
    SELECT ap.desc_applicazione,pe.seq_periodo, pe.desc_elem_temp_ist,
    sg.desc_segmento_elab,pg.seq_progressivo,
    pg.desc_stato,pg.ts_start,pg.ts_stop,pg.nota_esecuzione,pg.ts_esecuzione,
    pg.valore_prog,sg.seq_segmento,idProg
    FROM testXML p,
    XMLTable('/applicazione' PASSING p.xmlData
    COLUMNS
    seq_applicazione for ordinality,
    desc_applicazione VARCHAR2(50) PATH '@nome',
    periodo XMLType PATH 'periodo') ap,
    XMLTable('periodo' PASSING ap.periodo
    COLUMNS
    seq_periodo for ordinality,
    desc_elem_temp_ist VARCHAR2(50) PATH '@nome',
    segmento XMLType PATH 'segmento') pe,
    XMLTable('segmento' PASSING pe.segmento
    COLUMNS
    seq_segmento for ordinality,
    desc_segmento_elab VARCHAR2(50) PATH '@nome',
    progressivo XMLTYPE PATH 'progressivo') sg,
    XMLTable('progressivo' PASSING sg.progressivo
    COLUMNS
    seq_progressivo for ordinality,
    valore_prog NUMBER PATH '@valore',
    desc_stato VARCHAR(10) PATH 'stato',
    ts_start VARCHAR2(50) PATH 'ts_start',
    ts_stop VARCHAR2(50) PATH 'ts_stop',
    nota_esecuzione VARCHAR2(50) PATH 'nota_esecuzione',
    ts_esecuzione VARCHAR2(50) PATH 'ts_esecuzione'
    ) pg
    where idProg = 1
    I obtained only 999 rows.
    I tried with two file xml, one containing 10000 repetition of progressivo, the other containing 10000 repetition of segmento.
    Anybody know why? Where is my error?
    Thank you in advance for any response.
    Maurizio

    Hello,
    I'm new in the forum.
    Sorry for my english.
    I have a problem reading an xmltype column.
    My oracle's version is 11.1.0.6.0
    I have a table like this:
    Create Table TestXml (idProg number, xmldata XmlType)
    XMLTYPE COLUMN xmldata
    STORE AS BINARY XML;
    I have a xml file containing the equivalent of 10000 record (like a csv).
    my schema xsd is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="applicazione">
              <xs:annotation>
                   <xs:documentation>Flusso Monitoraggi</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="periodo" maxOccurs="unbounded">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="segmento" maxOccurs="unbounded">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element name="progressivo" maxOccurs="unbounded">
                                                           <xs:complexType>
                                                                <xs:sequence>
                                                                     <xs:element name="stato" type="xs:string"/>
                                                                     <xs:element name="ts_start" type="xs:string"/>
                                                                     <xs:element name="ts_stop" type="xs:string"/>
                                                                     <xs:element name="nota_esecuzione" type="xs:string"/>
                                                                     <xs:element name="ts_esecuzione" type="xs:string"/>
                                                                </xs:sequence>
                                                                <xs:attribute name="valore" type="xs:integer" use="required"/>
                                                           </xs:complexType>
                                                      </xs:element>
                                                 </xs:sequence>
                                                 <xs:attribute name="nome" type="xs:string" use="required"/>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                                  <xs:attribute name="nome" type="xs:string" use="required"/>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
                   <xs:attribute name="nome" type="xs:string"/>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    When I try to read my xmltype column with this select :
    SELECT ap.desc_applicazione,pe.seq_periodo, pe.desc_elem_temp_ist,
    sg.desc_segmento_elab,pg.seq_progressivo,
    pg.desc_stato,pg.ts_start,pg.ts_stop,pg.nota_esecuzione,pg.ts_esecuzione,
    pg.valore_prog,sg.seq_segmento,idProg
    FROM testXML p,
    XMLTable('/applicazione' PASSING p.xmlData
    COLUMNS
    seq_applicazione for ordinality,
    desc_applicazione VARCHAR2(50) PATH '@nome',
    periodo XMLType PATH 'periodo') ap,
    XMLTable('periodo' PASSING ap.periodo
    COLUMNS
    seq_periodo for ordinality,
    desc_elem_temp_ist VARCHAR2(50) PATH '@nome',
    segmento XMLType PATH 'segmento') pe,
    XMLTable('segmento' PASSING pe.segmento
    COLUMNS
    seq_segmento for ordinality,
    desc_segmento_elab VARCHAR2(50) PATH '@nome',
    progressivo XMLTYPE PATH 'progressivo') sg,
    XMLTable('progressivo' PASSING sg.progressivo
    COLUMNS
    seq_progressivo for ordinality,
    valore_prog NUMBER PATH '@valore',
    desc_stato VARCHAR(10) PATH 'stato',
    ts_start VARCHAR2(50) PATH 'ts_start',
    ts_stop VARCHAR2(50) PATH 'ts_stop',
    nota_esecuzione VARCHAR2(50) PATH 'nota_esecuzione',
    ts_esecuzione VARCHAR2(50) PATH 'ts_esecuzione'
    ) pg
    where idProg = 1
    I obtained only 999 rows.
    I tried with two file xml, one containing 10000 repetition of progressivo, the other containing 10000 repetition of segmento.
    Anybody know why? Where is my error?
    Thank you in advance for any response.
    Maurizio

  • Update query for XMLTYPE column

    Hello everyone,
    I have inserted xml data into XMLTYPE column of my table,xml data is something like this
    <Data type="FYI">                         
    <ID xmlns="http://orcl.com">T-1-1</ID>
    <Category>FRAME</Category>
    <ProductID>1</ProductID>
    <Name xmlns="http://orcl.com">Frame </Name>
    <Type>BASIC</Type>
    <Code>INSTALL</Code>
    <NodeID>1</NodeID>
    </Data>
    Now i need to update the values inside the <Data> element,like
    ID == T-2-2
    Category == IFRAME
    ProductID == 1.1
    Name == IFRAME
    We are using oracle 10g R2.
    Please help me out how to update. It would be very thankfull for your valuble suggestions
    Thanks in advance

    <Services>
    <DataService type="FRLY">
    <ID xmlns="http://www.openapplications.org/oagis/9">T-1-1-FRLY</ID>
    <CategoryCode>FRAME</CategoryCode>
    <ProductOfferingID>1</ProductOfferingID>
    <Name xmlns="http://www.openapplications.org/oagis/9">Frame Relay</Name>
    <SubType>FRLY - BASIC</SubType>
    <ActionCode>INSTALL</ActionCode>
    <NodeID>1</NodeID>
    <Contract>
    <ID xmlns="http://www.openapplications.org/oagis/9" schemeName="Networx Universal">00000</ID>
    <Category name="Contract Type">U</Category>
    </Contract>
    <Contract>
    <Type xmlns="http://www.openapplications.org/oagis/9">Routine</Type>
    </Contract>
    <CustomerParty>
    <Location/>
    </CustomerParty>
    <ProvisioningStatus type="BillingSetup">
    <Description xmlns="http://www.openapplications.org/oagis/9">C</Description>
    </ProvisioningStatus>
    <MileStone>
    <ID xmlns="http://www.openapplications.org/oagis/9">CWD</ID>
    <Date>2007-01-29</Date>
    </MileStone>
    <ActivityStatus>
    <Code xmlns="http://www.openapplications.org/oagis/9" name="DueDate"/>
    <EffectiveDateTime xmlns="http://www.openapplications.org/oagis/9">2007-01-29T00:00:00Z</EffectiveDateTime>
    </ActivityStatus>
    <AssociatedIDs>
    <ID xmlns="http://www.openapplications.org/oagis/9">1</ID>
    </AssociatedIDs>
    <AssociatedIDs>
    <TemporaryID schemeName="OPKEY">34908</TemporaryID>
    </AssociatedIDs>
    <Location>
    <ID xmlns="http://www.openapplications.org/oagis/9">T-510092</ID>
    </Location>
    <OrderID>RequestID</OrderID>
    <Accessory>
    <ActionCode>ADD</ActionCode>
    <Description xmlns="http://www.openapplications.org/oagis/9">IBM ESERVER-XSERIES306</Description>
    <CategoryCode>5</CategoryCode>
    <InstallVendorParty>
    <Name xmlns="http://www.openapplications.org/oagis/9">MCI</Name>
    </InstallVendorParty>
    </Accessory>
    <Circuit>
    <ID xmlns="http://www.openapplications.org/oagis/9">T-1-1-FRLY</ID>
    <AssociatedIDs/>
    </Circuit>
    </DataService>
    </Services>
    This was my xml which i have inserted into DB for the column XMLTYPE.Now i need to update few values in this whole file like values of
    ID under<DataService>
    Name under <DataService>
    ID under <Contract>
    Description under <ProvisioningStatus>
    i was using the UPDATEXML query to update those it's saying i row updated but when i extract it says null.
    Please help me out to solve this problem.
    Thanks in advance.

  • How to retrive xmltype columns in xsql

    I saw xsql power. It was great. I checked it like this:
    <xsql:query>select * from emp</xsql:query>
    and it went fine.
    But I got error when I tried to run this query:
    <xsql:query>select my_xmltype from sample_xmltype_table</xsql:query>
    in it the table has one xmltype column.
    Do I have to write long listings, or I can retrieve xmltype columns, as simple as what went in the first example?
    Regards
    [email protected]

    Do you have nlscharset_12.jar in your classpath?
    what web server are you using XSQL with?
    Have you tried using real bind variables like this:
    <xsql:query bind-params="name">
    select * from emp where ename = ?
    </xsql:query>
    Does a query like:
    <xsql:query bind-params="name">
    select * from emp
    </xsql:query>
    return the korean data to the browser correctly?

  • Get xmlType column into xsql page

    I have a table with normal columns such as string types, plus one xmlType column.
    For example, the xmltype column can be <mark>ibm</mark>.
    In xsql page, I tried to select all the columns out (including the xmltype col).
    I want the xml column as part of the final xml output such as:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <page>
    <ROWSET>
    <ROW num="1">
    <xmlcolumn>
    <mark>ibm</mark>
    </xmlcolumn>
    </ROW>
    </ROWSET>
    </page>
    I found out that I can't just do:
    select t.xmlcolumn from table t;
    The page complain that can't convert xmlType to string.
    So I did
    select t.xmlcolumn.getClobString() as xmlcolumn from table t;
    However I got:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <page>
    <ROWSET>
    <ROW num="1">
    <xmlcolumn>&lt;mark>ibm&/lt;mark>
    </xmlcolumn>
    </ROW>
    </ROWSET>
    </page>
    It seems that xsql translate the <mark>ibm</mark> to real String instead of integrate it into the final xml string.
    Does anyone know how to do this?
    Thanks a lot.
    Kai.

    hi
    I have this:
    CREATE TABLE XML_TAB (XMLVAL XMLTYPE);
    INSERT INTO XML_TAB VALUES (XMLTYPE('<EMP><EMPNO>666</EMPNO><ENAME>Jef</ENAME></EMP>'));
    INSERT INTO XML_TAB VALUES (XMLTYPE('<EMP><EMPNO>777</EMPNO><ENAME>Jan</ENAME></EMP>'));So in SQL*Plus "SELECT XMLVAL FROM XML_TAB" gives:
    XMLVAL
    <EMP>
      <EMPNO>666</EMPNO>
      <ENAME>Jef</ENAME>
    </EMP>
    <EMP>
      <EMPNO>777</EMPNO>
      <ENAME>Jan</ENAME>
    </EMP>If I try this test1.xsql:
    <xsql:query connection="my_conn" xmlns:xsql="urn:oracle-xsql">
    SELECT XMLVAL FROM XML_TAB
    </xsql:query>I get java.lang.NoClassDefFoundError: oracle/xdb/XMLType
    If I try this test2.xsql:
    <xsql:query connection="my_conn" xmlns:xsql="urn:oracle-xsql">
    SELECT (XMLVAL).getClobVal() AS XMLVAL FROM XML_TAB
    </xsql:query>I get this "escaped output":
    <?xml version = '1.0'?>
    <ROWSET>
       <ROW num="1">
          <XMLVAL>&#38;lt;EMP>&#38;lt;EMPNO>666&#38;lt;/EMPNO>&#38;lt;ENAME>Jef&#38;lt;/ENAME>&#38;lt;/EMP></XMLVAL>
       </ROW>
       <ROW num="2">
          <XMLVAL>&#38;lt;EMP>&#38;lt;EMPNO>777&#38;lt;/EMPNO>&#38;lt;ENAME>Jan&#38;lt;/ENAME>&#38;lt;/EMP></XMLVAL>
       </ROW>
    </ROWSET>But I want this, just XML:
    <?xml version="1.0" ?>
    <ROWSET>
         <ROW num="1">
              <XMLVAL><EMP><EMPNO>666</EMPNO><ENAME>Jef</ENAME></EMP></XMLVAL>
         </ROW>
         <ROW num="2">
              <XMLVAL><EMP><EMPNO>777</EMPNO><ENAME>Jan</ENAME></EMP></XMLVAL>
         </ROW>
    </ROWSET>So if I understand your suggestion and try this wrapper.xsql:
    <xsql:include-xsql xmlns:xsql="urn:oracle-xsql" href="test2.xsql" reparse="yes"/>... I still get the same "escaped output" as above
    In the xsu12.jar I use is a file named "XSU12_VERSION_9_2_0_1_0_rdbms", does this tell me anything about the version?
    What am I doing wrong here?
    tnx
    -Jan

  • Query about XMLTYPE column structured storage in Oracle Xml db

    Dear All,
    DB Version: Oracle 11g (11.2.0.3.0)
    I have an table having one column as XMLTYPE with Structured storage.
    CREATE TABLE Orders
        Order_id NUMBER NOT NULL,
        Order_etc VARCHAR2(100),
        Order_desc XMLType NOT NULL
        XMLTYPE Order_desc STORE AS OBJECT RELATIONAL XMLSCHEMA  "http://localhost/public/xsd/order_desc_xsd.xsd" ELEMENT "OrderState";
    I have then registered the XSD with XML Db schema which is required for Structured storage.
    Before this table creation I had created a table (db_objects) of XMLTYPE and was able to use the below query to check for what all objects the XMLTYPE table got broken into when I registered its XSD.
        SELECT column_name,     
               data_type
        FROM   user_tab_cols
        WHERE  table_name = 'DB_OBJECTS';
    And used below query to look for data stored in Object-Relational structure for my table (DB_OBJECTS) created with XMLTYPE definition.
      SELECT EXTRACTVALUE(xseq.column_value, '/THISROW/OWNER')       AS owner
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/OBJECT_NAME') AS object_name
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/OBJECT_TYPE') AS object_type
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/OBJECT_ID')   AS object_id
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/CREATED')     AS created
        FROM   db_objects do
         ,      TABLE(XMLSEQUENCE(EXTRACT(VALUE(do), '/ROWSET/THISROW'))) xseq 
        WHERE  ROWNUM <= 10;
    Now could someone let me know, how to find how the column (Order_desc) of XMLTYPE was broken down into further objects just like I did for the Table with XMLTYPE (as shown above)?
    Many Thanks.

    First given that you are on 11.2, ExtractValue is deprecated and the documentation lists three options to use instead.  Here is one option (untested)
    SELECT owner, object_name, object_type, object_id, created
      FROM db_objects do,
           XMLTable('/ROWSET/THISROW'
                    PASSING do.object_value
                    COLUMNS
                    -- Set data types accordingly
                    owner        VARCHAR2(20) PATH 'owner',
                    object_name  VARCHAR2(20) PATH 'object_name',
                    object_type  VARCHAR2(20) PATH 'object_type',
                    object_id    VARCHAR2(20) PATH 'object_id',
                    created      VARCHAR2(20) PATH 'created');
    Second, why does column order matter?  You are storing in an object relational method.  As long as the XML is valid per the schema, the Oracle will be able to store the data and later retrieve it as well.  How that data is stored is mostly Oracle internals and should not be touched as it can be changed from version to version.  You can use schema annotation to control how Oracle maps and stores the XML, but nothing in there specifies column order that I am aware of.
    It seems additional details are missing as to what you need the information for so that would help others answer your question.

  • XMLDB query on XmlType Column.

    Hi,
    I’ve some problems.
    I’ve some search queries which are working on normal relation table, but I don’t know how it works on XMLDB(Oracle 10gR2)
    Structure of XML file
    My xml table structure will be :
    Create table <tablename>
    Person_Id number primary key,
    Person_BankName varchar2,
    DateOfEntry date,
    Xmlcol xmltype
    Xmlcol xmltype will be mapped to a schema for the below xml file.
    XML File
    <Person>
         <Information>
              <firstname>Suchendra</firstname>
              <lastname>Kumar</lastname>
              <middlename>Krishna</middlename>
         </Information>
         <Account>
              <accountno>12212</accountno>
              <balance>42323.89</balance>
              <opendate>12-03-2005</opendate>
         </Account>
         <Transaction>
              <transamount>1000</transamount>
              <balance>41323.89</balance>
              <trandate>14-03-2005</ trandate >
              <trantime>10:40:22</trantime>
         </ Transaction >
    </Person>
    SQL Queries Required
    1.     Query to fetch the records whose transaction has been done from date 12-03-2001 to date 01-01-2005.
    2.     Query to fetch the records whose lastname= “*Kumar”
    3.     Query to fetch the records whose transaction has been done from time 9:09:55 to time12:26:23.
    4.     Query to fetch the records whose balance > 4000 and balance < 5000.
    5.     Regular expression Search in XMLDB. Ex: searching for records whose firstname has ‘su*’ or ‘*ab’ in it.
    Can anyone help me in this..
    Thanks
    Athar

    1. select *
    from <tablename>
    where extractValue(Xmlcol, '/Person/trandate') is between '12-03-2001' and '01-01-2005';
    2. select *
    from <tablename>
    where extractValue(Xmlcol, '/Person/lastname') like '*Kumar';
    3. select *
    from <tablename>
    where extractValue(Xmlcol, '/Person/trantime') is between '9:09:55' and '12:26:23';
    4. select *
    from <tablename>
    where extractValue(Xmlcol, '/Person/balance') > 4000'
    and extractValue(Xmlcol, '/Person/balance') < 5000;
    5. select *
    from <tablename>
    where extractValue(Xmlcol, '/Person/firstname') like 'su*'
    or extractValue(Xmlcol, '/Person/firstname') like ‘*ab’;
    Regards,
    Kamal Shrivastava

  • Size xmltype in xsql servlet

    we have a table:
    nr number,
    text_a xmltype
    we use xsql-servlet for searching:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsql:query xmlns:xsql="urn:oracle-xsql" connection="xxx">
    SELECT text_a from texte txt where nr=2
    </xsql:query>
    everything works fine until the size of the xml-type grows over 17K; then we get error messages: XML-0201, XML-
    0122, XML-0125
    the select statement works in sqlplus and we see that the xmltype is o.k.
    It seems to be a problem of size in xsql ?????

    XSQL is just a shell to send SQL request. You'll still need to write a logic to convert HTML to request to SQL. I'll probably use the NAME attribute in INPUT tag to differentiate selections and use it in the WHERE clause.

  • Query handled OK on Oracle server but XSQL Servlet raises OracleXMLSQLException

    After dropping and recreating certain object types, and then using ALTER TYPE on an object dependent on those object types, XSQL Servlet raises exception for a query that is handled fine in the Oracle Server itself (ie, in SQL*Plus) as in the following test case:
    create or replace type o_object_inner as object( char1 char(1) )
    create or replace type n_nested_table as table of o_object_inner
    create or replace type o_object_outer as object (nNestedTab n_nested_table)
    For above, the following query encounters no problems on Oracle Server or in XSQL servlet:
    Select o_object_outer(NULL) as "theOuterObj" from dual
    But then if object types are modified as follows:
    drop type o_object_inner force
    create or replace type o_object_inner as object( char1 char(1) ) --same as above
    drop type n_nested_table force
    create or replace type n_nested_table as table of o_object_inner --same as above
    alter type o_object_outer compile
    The above query now encounters no problems in SQL*Plus but generates exception in XSQL servlet as follows:
    oracle.xml.sql.OracleXMLSQLException: Internal Error: Unable to resolve name
    More complex cases generated the above exception and/or the following exception:
    oracle.xml.sql.OracleXMLSQLException: Internal Error: Invalid ADT attribute
    Any insight or help would be greatly appreciated!
    Other info:
    Oracle Server 8.1.7.3 on HP-UX
    XDK 9.2.0.1 (Production) for Java on NT
    JDBC/OCI8 drivers for NT (latest for 8.1.7)

    Yes,
    I changed most of the cursor functions to cast(multiset()). Sometimes i divided a big query into two or three queries (when there was cursor nested in a cursor). It was one day work for me. Don't forget to change the tags with ROW to ITEM in your xsl-stylesheets.
    Uwe

  • XMLtype column report query

    I want to have a user input information into a text box and use the information to query my xmltype column (Oracle 11g) to extract data from a few of the tags and generate a report. From what I can tell APEX query builders for generating reports do not allow you to use xmltype columns. Is there another way to do this? I can write xml queries in SQL but I don’t know how to take the results and make a report in APEX. Does anyone know how to do this? Thanks!

    Wrong forum.. queries using contains should be posted in the oracle text forum..

  • Query on XMLType! URGENT!!!

    Please, what the most efficient way to query a xmltype column?
    My xml's are 250KB ~ 1.5 MB and my table have over 130.000 records.
    I have tried:
    1) interMedia -> create index [indexname] on [table] (field) indextype is ctxsys.context parameters ('section group path_section_group')
    but results a error on creating...
    2) Table Functions, but a enough memory error results...
    3) create index on xpath directly, but the repetead tag's are discarded...
    I don't know what to do...
    Please, help me!!!
    Thanks...
    Marlon

    May be this is of some help -
    "compile error in hidden module: clBExevent bulider" error in BW 3.5!

  • Impdp, XMLType column and ora-26093

    Hello!
    I have some problem with importing XMLType columns with data longer than 2000 symbols.
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    test data:
    create table some_tab (id varchar2(10), xml XMLType);
    insert into some_tab values('short', XMLType('<foo></foo>'));
    -- we use clob to pass more than 2000 symbols
    declare
    c clob := '<x> || lpad('</x>', 2700, 'a');
    begin
    insert into some_tab values('long', XMLType(c));
    end;
    then I export data with expdp...
    and if I import dump into other schema on the same server - that's ok,
    BUT if I import data into schema on other server - I have this error:
    KUP-11007: conversion error loading table ......
    ORA-26093: input data column size (2707) exceeds the maximum input size (2000)
    KUP-11009: data for row: ....
    what I'm doing wrong?
    thank you

    user2606534 wrote:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    ORA-26093: input data column size (2707) exceeds the maximum input size (2000)
    Bug 7209038
    DATAPUMP NOT IMPORTING XMLTYPE OBJECTS. ORA-26093
    Currently no workaround is available for this, although 11gR2 should have it fixed.

  • Query slow in table having XMLTYPE column

    Hi,
    I've a table and a XMLTYPE column in it.
    table:
    a number
    b xmltype
    now when 1000 records are present and I do a select * form table it runs for 5-8 mins..
    if i put an index on a and do teh query using the index still it takes 5-6 secs to retrieve a single query.
    Is it normal ? I mean to say is it because of the clob it's taking time or I can tune it ?
    Thanks,
    Arun

    What sort of query are you running on it?
    As a rule, XMLTYPE and CLOB columns tend to be big. On the other hand they would normally be stored out of line, so I don't see why they should affect a full table scan.
    As is the usual case with performance questions, you must provide sufficient information for us to answer your question. Please read Rob Van Wijk's helpful guide on the sort of things we need to know (and incidentally how you can start to solve your problem yourself): [When your query takes too long|http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]. Randolf Geist has knocked up a [HOW TO: Post a SQL statement tuning request  |http://forums.oracle.com/forums/thread.jspa?threadID=863295] which is a template of the helpful way to layout a tuning question. Also, read [his blog on the topic|http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html]
    You might also benefit from reading [Tom Kyte&#146;s advice on how to ask questions|http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html].
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Problems installing latest XSQL Servlet

    After following the instructions for installing XSQL servlet for Apache with Jserv, I get the following error with a simple sql query.
    Oracle XSQL Servlet Page Processor 9.0.1.0.0 (Production)
    XSQL-017: Unexpected Error Occurred
    java.lang.AbstractMethodError: oracle/jdbc/driver/OracleResultSet.getStatement
    at oracle.xml.sql.dataset.OracleXMLDataSetExtJdbc.(OracleXMLDataSetExtJdbc.java:117)
    at oracle.xml.sql.core.OracleXMLConvert.initObject(OracleXMLConvert.java:345)
    at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:823)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:364)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:312)
    at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(XSQLQueryHandler.java:240)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:132)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:134)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
    at org.apache.jserv.JServConnection.run(JServConnection.java:188)
    at java.lang.Thread.run(Thread.java:475)
    Can anyone help

    I have included the following libs as described in the installation notes
    ie in the jserv.properties file I have
    # Oracle XSQL
    # Oracle XML SQL Utility (XSU)
    wrapper.classpath=C:\xsql\lib\sax2.jar
    wrapper.classpath=/usr/local/src/xdk/lib/xsu12.jar
    # Oracle XSQL Servlet
    wrapper.classpath=/usr/local/src/xdk/lib/oraclexsql.jar
    # Oracle JDBC (8.1.6) -- JDBC 2.0 driver
    wrapper.classpath=/usr/local/src/xdk/lib/classes12.zip
    # Oracle XML Parser V2 (with XSLT Engine)
    wrapper.classpath=/usr/local/src/xdk/lib/xmlparserv2.jar
    # XSQLConfig.xml File location
    wrapper.classpath=/usr/local/src/xdk/xdk/admin
    # FOR Apache FOP Generation, Add
    # wrapper.classpath=C:\xsql\lib\xsqlserializers.jar
    # wrapper.classpath=FOPHOME/fop_bin_0_14_0.jar
    # wrapper.classpath=FOPHOME/lib/w3c.jar
    And in the httpd.conf file I have
    Alias /xsql/ "/usr/local/src/xdk/xdk/"
    Also in the xml config file
    <connection name="promptl">
    <username>******</username>
    <password>******</password>
    <dburl>jdbc:oracle:thin:@192.****:1521:8C</dburl>
    <driver>oracle.jdbc.driver.OracleDriver</driver>
    </connection>
    I think the problem may be with my jdbc file???
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Have include all the libs like:
    # Oracle XSQL Servlet
    wrapper.classpath=/private/orahome/lib/oraclexsql.jar
    # Oracle JDBC
    wrapper.classpath=/private/orahome/jdbc/lib/classes12.zip
    # Oracle XML Parser V2 (with XSLT Engine)
    wrapper.classpath=/private/orahome/lib/xmlparserv2.jar
    # Oracle XML SQL Components for Java
    wrapper.classpath=/private/orahome/rdbms/jlib/xsu12.jar
    Especially xsu12.jar?<HR></BLOCKQUOTE>
    null

  • Help on how to query 11g table with XMLType column

    To all,
    We have this table:
    DESC MESSAGE
    Name Null Type
    MESSAGE_ID NOT NULL NUMBER(38)
    REQUEST_UU_ID NOT NULL VARCHAR2(50)
    MESSAGE_TYPE_CD NOT NULL CHAR(3 CHAR)
    EMPLOYEE_NUM NOT NULL VARCHAR2(8)
    SEQUENCE_NUM VARCHAR2(20)
    REVERSAL_SEQUENCE_NUM VARCHAR2(20)
    TRANSACTION_TS TIMESTAMP(6)
    MESSAGE_CONTENT_TXT NOT NULL XMLTYPE()
    CREATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    CREATE_BY_TS NOT NULL TIMESTAMP(6)
    LAST_UPDATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    LAST_UPDATE_BY_TS NOT NULL TIMESTAMP(6)
    Given we have multiple columns and one is XMLType how do I query to find rows in the db that match this XPath
    Here is a fragment of XML that is held in MESSAGE_CONTENT_TXT XMLType column:
    <?xml version="1.0" encoding="UTF-8"?>
    <cfg-env:Envelope xmlns="http://www.co.com/schemas/CFX/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.co.com/schemas/cfg-env/" >
         <cfg-env:Header>
              <cfg-hdr:MessageHeader xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns="http://www.co.com/schemas/CFX/">
                   <cfg-hdr:Service>
                        <cfg-hdr:ServiceName>process</cfg-hdr:ServiceName>
                        <cfg-hdr:MessageType>Request</cfg-hdr:MessageType>
                        <cfg-hdr:ServiceVersion>1</cfg-hdr:ServiceVersion>
                   </cfg-hdr:Service>
                   <cfg-hdr:From>
                        <cfg-hdr:PartyId>13-175-8724</cfg-hdr:PartyId>
                        <cfg-hdr:CostCenter>2009065</cfg-hdr:CostCenter>
                        <cfg-hdr:System>
                             <cfg-hdr:Application>[email protected]</cfg-hdr:Application>
                             <cfg-hdr:Version>1.0</cfg-hdr:Version>
                             <cfg-hdr:Channel>TLR</cfg-hdr:Channel>
                        </cfg-hdr:System>
                        <cfg-hdr:OrigReplyToQMgr>QMBKRD01</cfg-hdr:OrigReplyToQMgr>
                        <cfg-hdr:OrigReplyToQ>Q1</cfg-hdr:OrigReplyToQ>
                   </cfg-hdr:From>
                   <cfg-hdr:UserSession>
                        <cfg-hdr:SignonRole>User</cfg-hdr:SignonRole>
                        <cfg-hdr:LogonId>R099999</cfg-hdr:LogonId>
    I'm trying to find rows in the database that are /Envelope/Header/MessageHeader/UserSession/LogonId/R099999.
    Thanks for the assistance. I'm new to XML DB. I appreciate the help.
    Eric

    Hi Eric,
    You can use XMLExists, like this :
    select *
    from message t
    where xmlexists(
          'declare namespace env = "http://www.co.com/schemas/cfg-env/"; (: :)
           declare namespace hdr = "http://www.co.com/schemas/cfg-hdr/"; (: :)
           /env:Envelope/env:Header/hdr:MessageHeader/hdr:UserSession[hdr:LogonId=$id]'
           passing t.message_content_txt
                 , 'R099999' as "id"
    );

Maybe you are looking for

  • Issue in enabling dbx rtc for memory leak analysis

    Any help on this is highly appreciated ... Following is the issue: pass@odcsmoke1> dbx -C xfer changes (topic) The major new features of this release relative to 6.1 are: o The dbx environment variable "rtc_use_traps" has been removed. Traps are used

  • How to close an Investment Project without Capitalizing

    Hi All, Requirement is how to close an Investment Project midway, when cost have been settled to AuC over several periods. In present system they transfer the cost from their Work In progres account to a Cost center. Thanks and regards Maneesh

  • MS Project 2013 - How to create a report filter to show Tasks Completed Last Week

    I am attempting to create a report that can show all tasks that have been completed in the past week.  When I create the filter I can find no inherent way for this to be done and I see no basis for the logic necessary to complete this in the other pr

  • Changing The Library Folder

    I'm a DJ and I just put all my music in a folder on my sever with all my music I just want to know if there is a Way to set up the Library to go on my server instead of my music folder. Thanks, The boss

  • Flex Builder 2 Upgrade problem

    Hi, I've got Flex Builder 2 (no charting included) and want to upgrade to Flash Builder 4 Premium. The problem i've met is there is no one step upgrade :/ Seller told me that i must upgrade to Flash Builder 4 Standard and then upgrade to Premium. But