Sample XML SQL to Oracle

hi
we need some help for a sample sql to a oracle database
sql Plus is working
select
       MANDT,
       VBELN,
       ERDAT
       from sapm05.vbak
       where MANDT = '100'
       and VBELN = '0000000002'
       and ERDAT = '20050430'
when we put a sql like this (
- <nr1:Senden xmlns:nr1="http://www.mummert.de/xi/oracle/sql">
  <dbTableName action="SELECT" />
  <table>SAPM05.VBAK</table>
  <access col1="MANDT" col2="VBELN" col3="ERDAT" />
  <key1 col1="100" col2="0000000002" col3="20050430" />
  </nr1:Senden>
we get following error.
#1.5#000BCD5C946C004D00000030000019E80003FB8A3D5455A1#1120996082695#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.xml2sql.addAuditLog(PublicMessageKey, String, AuditLogStatus, String, String)#J2EE_GUEST#0####cfaf282bf12f11d98474000bcd5c946c#SAPEngine_Application_Thread[impl:3]_38##0#0#Error#1#com.sap.aii.adapter.jdbc.xml2sql#Plain###JDBC_ERR_403#
#1.5#000BCD5C946C004D00000032000019E80003FB8A3D5456D6#1120996082695#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.xml2sql.processList()#J2EE_GUEST#0####cfaf282bf12f11d98474000bcd5c946c#SAPEngine_Application_Thread[impl:3]_38##0#0#Error#1#com.sap.aii.adapter.jdbc.xml2sql#Plain###Structure:#
#1.5#000BCD5C946C004D00000034000019E80003FB8A3D5457DB#1120996082695#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.xml2sql.processList()#J2EE_GUEST#0####cfaf282bf12f11d98474000bcd5c946c#SAPEngine_Application_Thread[impl:3]_38##0#0#Error#1#com.sap.aii.adapter.jdbc.xml2sql#Plain###Analyzed structure:
0.  Level 2 Name: 'dbTableName'
#1.5#000BCD5C946C004D00000036000019E80003FB8A3D5459BB#1120996082695#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.xml2sql.service(Object, Object)#J2EE_GUEST#0####cfaf282bf12f11d98474000bcd5c946c#SAPEngine_Application_Thread[impl:3]_38##0#0#Error#1#com.sap.aii.adapter.jdbc.xml2sql#Plain### error in sax handler parsing request: Error when executing statement for table/stored proc. 'null': java.lang.IndexOutOfBoundsException: Index: 1, Size: 1#
#1.5#000BCD5C946C004D00000038000019E80003FB8A3D54DF2A#1120996082725#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.XI2JDBC.onInternalMessageBinary(Binary,String,IGUID,String)#J2EE_GUEST#0####cfaf282bf12f11d98474000bcd5c946c#SAPEngine_Application_Thread[impl:3]_38##0#0#Error#1#com.sap.aii.adapter.jdbc.XI2JDBC#Plain###Error processing request, rollback:
Error processing request in sax parser: Error when executing statement for table/stored proc. 'null': java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
     at com.sap.aii.adapter.jdbc.xml2sql.service(xml2sql.java:230)
     at com.sap.aii.adapter.jdbc.XI2JDBC.onInternalMessage(XI2JDBC.java:390)
     at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.callSapAdapter_i(SapAdapterServiceFrameImpl.java:173)
     at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.callSapAdapter(SapAdapterServiceFrameImpl.java:149)
     at com.sap.aii.af.modules.CallAdapterWithMessageBean.process_receiver(CallAdapterWithMessageBean.java:204)
     at com.sap.aii.af.modules.CallAdapterWithMessageBean.process(CallAdapterWithMessageBean.java:159)
     at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl1.process(ModuleLocalLocalObjectImpl1.java:103)
     at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:227)
     at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)
     at com.sap.aii.af.listener.AFWListenerBean.onMessage(AFWListenerBean.java:241)
     at com.sap.aii.af.listener.AFWListenerLocalObjectImpl0.onMessage(AFWListenerLocalObjectImpl0.java:103)
     at com.sap.aii.af.ra.ms.impl.ServicesImpl.deliver(ServicesImpl.java:282)
     at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:825)
     at com.sap.aii.af.ra.ms.impl.core.queue.RequestConsumer.onMessage(RequestConsumer.java:112)
     at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:447)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
can some one help us.
regards olaf

Hi Olaf,
why did you specify access, and key values as attributes?
try looking at:
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
the example of a select statement:
<StatementName4>
<dbTableName action=”SELECT”>
    <table>realDbTableName</table>
<access>
<col1/>
<col2/>
<col3/> 
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName> 
  </StatementName4>
you can also take a look at:
RDBMS system integration using XI 3.0 JDBC Sender/Receiver adapter
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
FILE to JDBC Adapter using SAP XI 3.0
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
to see how jdbc adapters are used
Regards,
michal
Message was edited by: Michal Krawczyk

Similar Messages

  • Creating sample XML file from Oracle Reports

    I did a search and could not find a good answer - hopefully this is not a dumb question.
    We are getting around to evaluating this tool, and I have looked at the whitepapers/user guides. I viewed the flash demo on how to build a template using the add-in. All of this seems really easy to do once you have the XML file generated.
    We have a custom report that outputted to PDF. Its a very simple report, so I went ahead and switch the output type to XML. When I go to view the file through the View Output button, it gives me an error about not being able to view it - the error says it cannot display the XML data with the current style sheet - gives a line number for the temporary file and thats about it.
    Question is this - should I be able to see the XML file through concurrent manager, or do I physically have to go the ouput directory and grab the file? I understand the whole process of hooking up a template to a concurrent program once I create it, but I figure having the data would make creating the template easier. Sort of a chicken and the egg things.
    Thanks!

    That sounds like a browser issue.
    once you flip the output to XML the 'Output' file from the concurrent manager will now be XML, try doing a save as rather than opening directly or use Tools>Copy file.
    Regards, Tim

  • Sample  PL/SQL Portlet Source Code for Oracle Portal 9ias

    Hi, I'm a newbie of Oracle Portal technology, and I have a problem:
    I would create a PL/SQL portlet that realizes the following functions:
    1) Retrieve the username of the portal user logged from WWCTX_API.GET_USER function.
    2) Insert into an oracle db table two values about two hidden fields in the HTML FORM of the portlet.
    3) Realize the insert commit through the click on the submit button on the Html form of the portlet. I would redirect by the same button to an other page url also.
    I've never developed in Portal, and may be useful if someone could post me the source code of the SHOW MODE SECTION in the PROCEDURE SHOW of a SAMPLE PL/SQL PORTLET that realizes the upper functions.
    Thanks a lot....

    Hi
    Here's the code from Helloworld_Portlet example:
    procedure show
    p_portlet_record wwpro_api_provider.portlet_runtime_record
    is
    l_portlet wwpro_api_provider.portlet_record;
    begin
    if (not is_runnable(
    p_provider_id => p_portlet_record.provider_id
    ,p_reference_path => p_portlet_record.reference_path)
    ) then
    raise wwpro_api_provider.PORTLET_SECURITY_EXCEPTION;
    end if;
    Retrieve the portlet information.
    l_portlet := get_portlet_info(
    p_provider_id => p_portlet_record.provider_id
    ,p_language => p_portlet_record.language
    if (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW) then
    if (p_portlet_record.has_title_region) then
    Draw the portlet header and specify what links are available
    from that header (i.e. details, customize, help, and about).
    The has_title property is set at the page region level.
    wwui_api_portlet.draw_portlet_header
    p_provider_id => p_portlet_record.provider_id
    ,p_portlet_id => p_portlet_record.portlet_id
    ,p_title => l_portlet.title
    ,p_has_details => true
    ,p_has_edit => true
    ,p_has_help => true
    ,p_has_about => true
    ,p_referencepath => p_portlet_record.reference_path
    ,p_back_url => p_portlet_record.page_url
    end if;
    Draw the portlet borders.
    The has_border property is set at the page region level.
    wwui_api_portlet.open_portlet(p_portlet_record.has_border);
    Display the content of the portlet in the show mode.
    Use the wwui_api_portlet.portlet_text() API when
    generating the content of the portlet so that the
    output uses the portlet CSS.
    htp.p(wwui_api_portlet.portlet_text(
    p_string => 'Hello World - Mode Show'
    ,p_level => 1
    if (p_portlet_record.has_border) then
    wwui_api_portlet.close_portlet;
    end if;
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_ABOUT) then
    Display the about page for the portlet.
    htp.p('Hello World - Mode Show About');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT) then
    Display the edit page for the portlet.
    htp.p('Hello World - Mode Show Edit');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_HELP) then
    Display the help page for the portlet.
    htp.p('Hello World - Mode Show Help');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS) then
    Display the edit defaults page for the portlet.
    htp.p('Hello World - Mode Edit Defaults');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_DETAILS) then
    Display the details page for the portlet.
    htp.p('Hello World - Mode Show Details');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_PREVIEW) then
    Display the preview page for the portlet.
    htp.p('Hello World - Mode Show Preview');
    end if;
    end show;
    I think you need to add this:
    You can get the values of your html-form with this command:
    v_hidden_1 varchar2(256);
    v_hidden_2 varchar2(256);
    v_hidden_1 := wwpro_api_parameters.get_value('name_of_hidden_1_in_html_form','p');
    v_hidden_2 := wwpro_api_parameters.get_value('name_of_hidden_2_in_html_form','p');
    You can get the actual URL with this command:
    v_url := p_portlet_record.page_url;
    Hope that helps.
    Regards,
    Mark

  • Unable to load Oracle XML SQL utility

    The following error appears for each java
    class, when we attempt to load Oracle XML sql
    utility into Oracle using the oraclexmlsqlload
    script:
    E.g.
    Error while resolving class OracleXMLStore
    ORA-00904: invalid column name
    Does anyone know why we would receive this error?
    Platform: Hp-UX 11.0
    Oracle Version: 8.1.5.0
    Background information:
    The database was original created with the
    compatible=8.0.5 set in the init.ora file, and
    the creatation of java classes failed due to this,
    so switched compatible to 8.1.0. Now after we
    we adjusted the compatible setting and restarted
    database, we started to receive the errors as
    described above.
    null

    Murali,
    Thank you, after I initialized Oracle's javavm
    the errors disappeared.
    The scripts were located under the javavm/install
    directory.
    Thanks again.
    Murali K (guest) wrote:
    : Hi Steven,
    : Is the JavaVM loaded. i.e. are all the classes necessary for
    : running Java in the server are loaded into the server? The
    most
    : common answer to your problem is that the javavm has not been
    : initialized correctly or the database does not have all the
    java
    : library files necessary to load java programs.
    : Please read chapter 4 in the Oracle8i java developers guide
    : which talks about initializing a java-enabled database by
    : running the initjvm script.
    : If this still occurs then maybe it is a bug and we will have
    to
    : look at it.
    : Thx
    : Murali
    : Steven Wegner (guest) wrote:
    : : The following error appears for each java
    : : class, when we attempt to load Oracle XML sql
    : : utility into Oracle using the oraclexmlsqlload
    : : script:
    : : E.g.
    : : Error while resolving class OracleXMLStore
    : : ORA-00904: invalid column name
    : : Does anyone know why we would receive this error?
    : : Platform: Hp-UX 11.0
    : : Oracle Version: 8.1.5.0
    : : Background information:
    : : The database was original created with the
    : : compatible=8.0.5 set in the init.ora file, and
    : : the creatation of java classes failed due to this,
    : : so switched compatible to 8.1.0. Now after we
    : : we adjusted the compatible setting and restarted
    : : database, we started to receive the errors as
    : : described above.
    null

  • Oracle.xml.sql.OracleXMLSQLException when using OracleXMLQuery getXMLDOM()

    Hi!
    I am trying to reuse a code in JDeveloper to get XML from a query. I have copied the code from a method and created a new method with the copied code and changed it. The problem is that when I run the old code I now get following error:
    Ett oförväntat fel har inträffat: Application: FND, Message Name: FND_GENERIC_MESSAGE.
    Tokens: MESSAGE = oracle.xml.sql.OracleXMLSQLException: Det här objektet har stängts.
    Vill du inte att objektet ska stängas automatiskt mellan anropen kan du granska metoden 'keepObjectOpen()'.;
    This means in english something like:
    An unexpected error accoured: Application: FND, Message Name: FND_GENERIC_MESSAGE = oracle.xml.sql.OracleXMLSQLException: This object is closed. If you don't want the object to close automatically between calls you can check method 'keepObjectOpen()';
    the code I'm running is:
    public String punchoutSomething()
    throws Exception
    StringBuffer sqlForXml =new StringBuffer("select pv.*"
    +", cursor(select * from XXPOS_PUNCHOUT_TABLE2 c where c.vendor_id=pv.vendor_id) as contacts"
    +" from XXPOS_PUNCHOUT_TABLE1 pv where vendor_id in (");
    // add all ids
    SuppSummVOImpl vendorView = getSuppSummVO();
    Row row;
    int punchoutCnt=0;
    // vendorView.reset();
    Row[] selectedRows = vendorView.getFilteredRows("SelectStatus","Y");
    for(int i=0;i<selectedRows.length;i++)
    if(punchoutCnt>0)
    sqlForXml.append(",");
    sqlForXml.append(((Number)selectedRows.getAttribute("VendorId")).toString());
    punchoutCnt++;
    if(punchoutCnt==0)
    sqlForXml.append("-1"); // make sql valid, will not return rows
    sqlForXml.append(")");
    // System.out.println(sqlForXml); // DEBUG
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    OracleXMLQuery xq = new OracleXMLQuery( tx.getJdbcConnection()
    , sqlForXml.toString()
    xq.setRaiseException(true); // in case of error raise an exception (default
    // is to generate an error document
    xq.setEncoding("UTF-8"); // not necessary?
    xq.useLowerCaseTagNames();
    xq.setRowsetTag("vendors");
    xq.setRowTag("vendors_row");
    //System.out.println(xq.getXMLString()); // DEBUG
    XMLDocument suppl = (XMLDocument)xq.getXMLDOM();
    XSLProcessor xslt = new XSLProcessor();
    InputStream sheetStream = this.getClass().getResourceAsStream("mystylesheet.xsl");
    if(sheetStream==null)
    throw new Exception("Could not load stylesheet");
    XSLStylesheet sheet = xslt.newXSLStylesheet(
    sheetStream
    StringWriter serialize = new StringWriter();
    xslt.processXSL(sheet,suppl,new PrintWriter(serialize));
    String returnXML = serialize.getBuffer().toString();
    // System.out.println("X:"+returnXML); // DEBUG
    sheetStream.close();
    return returnXML;
    ===================
    i've copied the same code into another method and only changed the sql-statment to be used and the stylesheet to use to transform the xml. Is something wrong with that?
    Another question: if the xsl refers to a xsd but wihtout any path where should it be?
    Thanks for the help,
    Patricia

    Actually, having looked at Metalink, seems that although this message may be accurate and correct,
    it has been 'introduced' as part of the 9i JDBC driver.
    So, I used the 8i JDBC driver I happened to have instead and that worked fine.

  • How to validate XML Digital Signature with XML DB (o PL/SQL) in Oracle 11g

    Hi,
    Do you know if there is possibility to validate XML Digital Signature using XML DB (or PL/SQL) in Oracle 11g?
    Let say I have CLOB/XMLType containing Digitally Signed XML, and I want to validate, that thsi is proper signature. I also have public key of signer (I could store it in CLOB or file or Oracle wallet).
    Is it possible to do?
    If there is need to install additional component - then which one?
    Regards,
    Paweł

    Hi,
    this is what i got from someone...
    but the links he gave are not opening up...
    u have to place a picture there and have to load the digital signatures as Jpegs on to the server to OA top
    and have to refer them in the XML for dynamically get the signature on the reports
    when u select the properties of the picture placed in the XML template,
    there will be one tab with "URL"... in that u have to give the path for that jpegs
    Pls refer the following documents for enabling digital signature on pdf documents.
    http://iasdocs.us.oracle.com/iasdl/bi_ee/doc/bi.1013/e12187/T421739T481159.htm#5013638    (refer section 'Adding or Designating a Field for Digital Signature'
    http://iasdocs.us.oracle.com/iasdl/bi_ee/doc/bi.1013/e12188/T421739T475591.htm#5013688
    (Implementing a Digital Signature
    Is the BI Publisher installed on your instance of version 10.1.3.4 or higher?
    Pls procure a digital signature as soon as possible. The process can take time. OR we could use any certificate that you already might have OR generate a certificate using Oracle Certificate Authority for demo.

  • Help Needed -- Oracle XML/SQL utility and PL/SQL parser

    Let's say we have an xml file
    <?xml version="1.0" standalone="no"?>
    <abc>
    <def>
    <ghi>test</ghi>
    </def>
    <jkl>
    <mno>testing</mno>
    </jkl>
    </abc>
    We can store the <def> tag in one table say def and <jkl> tag in another table say jkl.
    Is there a way to combine def and jkl and insert in one table so that there in one row with two columns test and testing??
    null

    Hi,
    Are u sure that it is a java enabled database? The most common
    case of failure with the xmlgen package is because the loadjava
    command did not succeed.
    Please make sure that oraclexmlsqlload.bat file loaded all the
    java procedures successfully. If not then u would have to java-
    enable your database by running the initjvm script. (please see
    the docs).
    Thx
    Murali
    Iveta Vojtko (guest) wrote:
    : Hi,
    : I have downloaded XML SQL Utility for Java against Oracle
    8.0.5
    : on WindowsNT. The xmlgen package was created successfully but
    : its body is invalid and my PL/SQL test has failed because of
    : following error: PLS-00103: Encountered the symbol "NAME"
    : when expecting one of the following: := . ( @ % ; not null
    range
    : renames default character. The symbol ":= was inserted abefore
    : "NAME" to continue.
    : Is it because I am not using Oracle8i? I just want to use the
    : server side of XML SQL. Please, reply asap. Thank you.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Oracle 8i Lite and XML SQL Utility

    Can I use XML SQL Utility with Oracle 8i Lite
    using the Oracle 8i Lite Driver
    null

    There will be an version of the XML SQL Utility appearing here shortly. In the meantime you can download the current version of the XSQL Servlet which has the new v2 compatible oraclexmlsql.jar.
    Oracle XML Team

  • Oracle.xml.sql.OracleXMLSQLException: Expected name instead of .

    Hi,
    I'm using XDK in Tomcat to execute queries and get the XML result in the browser. I have written many queries but now I'm having problems in one of them.
    The error output that I see in my browser is this one:
    <ROOT>
    <ERROR>
    oracle.xml.sql.OracleXMLSQLException: Expected name instead of <.
    </ERROR>
    </ROOT>:
    This error message is known as XML-20126 but it's not documented in the XML Developer's Kit Programmer's Guide, so I don't know what to do.
    My XSQL query is the following:
    <ROOT connection="xxxx_read" xmlns:xsql="urn:oracle-xsql">
    <xsql:query>
    SELECT XMLAGG(XMLELEMENT("NODE",
    XMLELEMENT("name", b.nodename),
    (SELECT XMLAGG(XMLELEMENT("SERVICE",
    XMLATTRIBUTES(a.serviceabbr AS "type")
    ORDER BY a.serviceabbr
    FROM service a, serviceinstance c
    WHERE c.isdeleted='N'
    AND a.serviceid=c.serviceid
    AND c.nodeid=b.nodeid
    ORDER BY b.nodename
    ) AS "NODES"
    FROM node b
    WHERE b.isdeleted='N'
    </xsql:query>
    </ROOT>
    That query executes fine in sqlplus, where I can see the XML result.
    I think my problem could be related to the size of the XML output. In sqlplus, the output has around 38000 bytes size, which is nothing, so I don't really know why that should be a problem. Do you have any idea?
    Thanks for your help,
    David

    So it seems there is a problem in fact:
    XDB FUNCTION RESULTS ARE TRUNCATED WHEN USING XSQL
    *** 02/25/04 08:28 am ***
    Problem Description
    There appears to be a limit on the content or characters that XSQL pages
    handle when being passed data from XDB functions such as XMLAGG() and
    XMLELEMENT().
    If you have a xsql page of the form
    < ?xml version="1.0"?>
    < xsql:query xmlns:xsql="urn:oracle-xsql" connection="demo" >
    select XMLAgg(XMLElement("Test", XMLAttributes(i.id as "Id_van_de_test",
    i.name as "Name_van_de_test"))) as "Tests" from problem_xml i
    < /xsql:query>
    If the number of rows (or amount of data) in the table is low, the result
    appears okay. However, if the data returned is large the data appears to
    truncate giving xml parsing errors as if the xml returned is not well formed.
    In the testcase provided, the error is as follows :-
    Results from 10.1.0.2
    < Line 2, Column 16354>: XML-20126: (Fatal Error) '< ' cannot appear in attribute value.
    < Line 2, Column 16366>: XML-20190: (Fatal Error) Whitespace required.
    < Line 2, Column 16366>: XML-20201: (Fatal Error) Expected name instead of 4.
    < ?xml version = '1.0'?>
    value.< /ERROR>
    Results from 9.2.0.6
    < Line 2, Column 16354>: XML-0126: (Fatal Error) '< ' cannot appear in attribute value.
    < Line 2, Column 16368>: XML-0190: (Fatal Error) Whitespace required.
    < Line 2, Column 16368>: XML-0201: (Fatal Error) Expected name instead of 3.
    < Line 2, Column 16371>: XML-0122: (Fatal Error) '=' missing in attribute.
    < Line 2, Column 16391>: XML-0190: (Fatal Error) Whitespace required.
    < Line 2, Column 16396>: XML-0122: (Fatal Error) '=' missing in attribute.
    < Line 2, Column 16397>: XML-0125: (Fatal Error) Attribute value should start with quote.
    < ?xml version = '1.0'?>
    value.< /ERROR>
    And the workaround:
    ======================================================
    The only workaround we have is to get the Document generated using
    DBMS_XMLQUERY [with expanded entities].
    _==Start===
    create or replace procedure Query2XML(QueryString varchar2 default
    'select col1 from xml_tab where r_id = ?') IS
    XMLCtx number;
    myXML clob;
    myXMLLength number;
    BEGIN
    XMLCtx := DBMS_XMLQUERY.NEWCONTEXT(QueryString);
    myXML := DBMS_XMLQUERY.GETXML(XMLCtx);
    myXMLLength := DBMS_LOB.GETLENGTH(myXML);
    DBMS_XMLQUERY.CLOSECONTEXT(XMLCtx);
    END Query2XMLFile;
    _==Start===
    Currently, XDB uses a DOM based model for XSLT evaluation. It is not
    possible to support disable-output-escaping constructs through this
    evaluation. This might be supported in a future release when a different
    model is implemented.
    =============================================================

  • Oracle.xml.sql.OracleXMLSQLException:Cannot enable auto commit within JTS transaction

    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

    Clearly , there does seem to be something a bit odd with the above stack.
    <Bug:1917808> mentions OracleXMLSave in context of plsql equivalent : dbms_xmlsave . i.e dbms_xmlsave is a wrapper around OracleXMLSave class.
    disabling autocommit on connection as follows should help:
    conn = DriverManager.getConnection("connect string","scott","tiger");
    conn.setAutoCommit(false);
    to disble auto commit and see if this has an effect.
    This issue might be <Bug:1497506>. If disabling autocommit does not work then it appears that it could be this issue .
    Malcolm
    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

  • JDeveloper Error ! oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode

    Hi All,
    I have 2 identical table structures with different data in Oracle.
    I am using following xsql and XSLT sheet to produce xml files with these tables. ( have to run twice xsql file by changing the Table names )
    When I run the xsql file with Table1, it works fine, produced the xml file on the browser.
    But when I run the xsql file with Table2, it gives following error message:
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'http://192.10.1.14:8988/Workspace_ONIX-ONIX2-context-root/untitled1.xsql'. Line 1, Position 1
    oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character.
    ^
    These two are my xsql and xslt files:
    - - - - xsql file - - - -
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <?xml-stylesheet type="text/xsl" href="TT14.xsl"?>
    <xsql:query connection="Connection1" id-attribute="" tag-case="lower"
    rowset-element="LIST" row-element="DEPA"
    xmlns:xsql="urn:oracle-xsql">
    SELECT * from TT26
    </xsql:query>
    TT14.xsl file
    <xsl:stylesheet version="1.0" encoding="UTF-8" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method ="xml" indent= "yes" encoding="UTF-8"/>
    <!--DOCTYPE ONIXmessage SYSTEM "http://www.editeur.org/onix/2.1/reference/onix-international.dtd"-->
    <xsl:template match ="list">
    <BBMessage>
    <<xsl:for-each select="depa">
    <Product>
    <RecordReference>
    <xsl:value-of select="wai"/>
    </RecordReference>
    <NotificationType>
    <xsl:value-of select="wantype"/>
    </NotificationType>
    </Product>
    </xsl:for-each>
    </BBMessage>
    </xsl:template>
    </xsl:stylesheet>
    All comments are highly welcomed...
    Thanks

    Hi Deepak
    Thanks for the post, but I am afraid that's not the issue with the error.
    I changed both encoding to "UTF-8" still i get the problem.
    I tried even without the XSLT sheet, still I have the problem..
    - - - - xsql file ---
    &lt;?xml version = '1.0' ?&gt;
    &lt;!--
    | Uncomment the following processing instruction and replace
    | the stylesheet name to transform output of your XSQL Page using XSLT
    &lt;?xml-stylesheet type="text/xsl" href="YourStylesheet.xsl" ?&gt;
    --&gt;
    &lt;page xmlns:xsql="urn:oracle-xsql" connection="Connection1"&gt;
    &lt;xsql:query max-rows="-1" null-indicator="no" tag-case="lower"&gt;
    select * from Table2
    &lt;/xsql:query&gt;
    &lt;/page&gt;
    - - - - Result ----
    &lt;?xml version="1.0" ?&gt;
    - &lt;!--
    | Uncomment the following processing instruction and replace
    | the stylesheet name to transform output of your XSQL Page using XSLT
    &lt;?xml-stylesheet type="text/xsl" href="YourStylesheet.xsl" ?&gt;
    --&gt;
    - &lt;page&gt;
    &lt;error&gt;oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character.&lt;/error&gt;
    &lt;/page&gt;
    Any Comment ???
    Thanks

  • Generating multi-level XML in Oracle 8i using XML-SQL utility

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

  • Oracle XSU: oracle.xml.sql.query.OracleXMLQuery is not recognized

    Hi, there!
    I've got a problem when tryed to use Oracle XSU (xml-sql utility to generate xml). My simple java application works fine using XSU. But when I created session stateless bean I've got an EJBException regarding this
    line:
    oracle.xml.sql.query.OracleXMLQuery qry = new oracle.xml.sql.query.OracleXMLQuery(conn, commandSQLStatement);
    It doesn't recognize OracleXMLQuery class as I've got in dump. So my classpath includes original location of that utility and Oracle parser.
    I really appreciate for any help.
    Thanks.
    strXML = qry.getXMLString();

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

  • Oracle.xml.sql.query.OracleXMLQuery   GetXML -withDTD

    I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU Command Line Utility, but I'm having a hard time trying to find out where the -withDTD flag goes inside my java program. Anyone know how to use the -withDTD option inside of a java program?
    Thanks

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

  • Oracle.xml.sql.query.OracleXMLQuery not found

    Hi!
    Sorry, but I got a project to continue and there is an import statement "import oracle.xml.sql.query.OracleXMLQuery;" and this gives me a compilation error...
    What do I need to do, where do I find this class??? Any help?
    //Patricia

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

Maybe you are looking for

  • After upgrading to Aperture 3.2.2 I can't edit my photo

    Laptop is new 2011 powerbook OS is lion 10.7.2 Previously I migrated aperature photos from old laptop to the new one via apple migration of the entire hardrive, one lap top to the other.  All photos were stored on the previous laptop and migrated to

  • HP Pavilion dv6-7080se recovery error

    when i  run recovery a message apper to me and say : windows faild to start  a recent hardware or software change might be the cause to fix the problem : 1 - insert ur windows instllation disc and restart ur computer 2 - chosse ur language settings a

  • I am trying to move my Acrobat 9 Pro Extended  from my older HP Win7 Pro notebook to my new HP Win 7

    I am trying to move my Acrobat 9 Pro Extended from my older HP Win7 Pro notebook to my new HP Win 7 Pro notebook. This should be WAY easy, and it's not. Sofware downloaded from MS/HP after new noteboook was safely home. Used Microsoft transfersoftwar

  • Can't hear audio for movies on 1st generation ATV

    Anybody know how to fix the audio while watching movies on first generation apple tv? On my apple tv, I can hear audio for music, music videos, youtube, internet radio and even movie previews! But..... when I pay for the rental download of a movie th

  • Is it possible to have only one line per item in InfoView document list?

    Hi, my customer is complaining about InfoView (Document list) wasting too much screen estate. For each list item (report, folder etc.) InfoView displays two lines, one for the name and one for the description. Is it possible to configure InfoView to