[XSU] OracleXMLSave

Hi!
I have a problem with loading XML file with OracleXMLSave.
I would to load an XML file 2 levels deep in an object-relational table in Oracle 9.2.0.1
the problem is generating the right schema DB for sustain the 2 level deep XML file.
my file is like this:
<person>
<name>alex</name>
<face>
<eyes>green</eyes>
<hair>brown</hair>
</face>
</person>
I created this schema DB on Oracle:
CREATE TYPE face_type AS OBJECT
("eyes" VARCHAR2(10),"hair" VARCHAR2(10))
CREATE TYPE person_type AS OBJECT
("name" VARCHAR2(20),"face" FACE_TYPE)
CREATE TABLE person_tab (person PERSON_TYPE)
my java code:
OracleXMLSave sav= new OracleXMLSave(...);
sav.setRowTag("person");
sav.setIgnoreCase(true);
sav.insertXML(<person><name>alex</name><face><eyes>green</eyes><hair>brown</hair></face></person>);
the problem:
the code don't generate exceptions or errors but the result in the table is not what I expected,in fact
the output of the below code
OracleXMLQuery qry = new OracleXMLQuery(con, "select * from PERSON_TAB");
String output = qry.getXMLString();
is:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1"/>
<ROW num="2"/>
</ROWSET>
(a <ROW> like these ones above for each inserXML(...))
Can somebody help me please? because I tried many and many times to understand where is the problem unsuccessfully :(
.Chucky.

I did the following test. How is your case different from this one below?
SQL> create table tt (n number);
Table created.
SQL> create table tt2( n number );
Table created.Then I wrote the Java program below:
import java.sql.*;
import java.io.*;
import oracle.xml.sql.dml.*;
import oracle.xml.parser.v2.*;
import org.w3c.dom.Document;
class TBone {
final static String xml =
"<ROWSET><TT><N>1</N></TT><TT2><N>2</N></TT2></ROWSET>";
public static void main (String arg[]) throws Exception {
Connection cn = ConnectionHelper.getConnection();
OracleXMLSave tt = new OracleXMLSave(cn,"TT");
OracleXMLSave tt2 = new OracleXMLSave(cn,"TT2");
DOMParser p = new DOMParser();
p.parse(new StringReader(xml));
Document d = p.getDocument();
tt.setRowTag("TT");
int rows = tt.insertXML(d);
System.out.println(rows+" rows inserted into TT");
tt2.setRowTag("TT2");
rows = tt2.insertXML(d);
System.out.println(rows+" rows inserted into TT2");
cn.close();
}and I get the output:
1 rows inserted into TT
1 rows inserted into TT2
and I correctly get a row with number 1 inserted into table TT and a row with number 2 inserted into table TT2.

Similar Messages

  • Error with XSU: oracle.jdbc2.Clob

    When I try to insert data I get the following error.
    java.lang.NoClassDefFoundError: oracle.jdbc2.Clob
    void samp10.main(java.lang.String[])
    Exception in thread main.
    I use classes112.zip with Oracle 8.1.7.
    I have Included following libraries in JDeveloper: Oracle XML SQL Utility, Oracle XML Parser 2.0, JServer, Connection Manager and Oracle 8.1.6 JDBC.
    The sourcecode of my .java file is:
    /** Simple example on using Oracle XMLSQL API; this class inserts the data from a XML document into the database*/
    import oracle.xml.sql.dml.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.jdbc.*;
    import java.net.*;
    public class samp10
    //========================================
    // main() - public static void
    public static void main(String args[]) throws SQLException
    String tabName = "XMLTEST_TAB1"; // table into which to insert
    String fileName = "sampdoc.xml"; // file name containing the xml doc
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //initiate a JDBC connection
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:SJEFEN",
    "scott","tiger");
    OracleXMLSave sav = new OracleXMLSave(conn, tabName);
    URL url = sav.createURL(fileName);
    int rowCount = sav.insertXML(url);
    System.out.println(" successfully inserted "+rowCount+
    " rows into "+ tabName);
    conn.close();
    The source code for the XML Document is:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW num="1">
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    </ROW>
    <ROW num="2">
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    </ROW>
    <ROW num="3">
    <EMPNO>7521</EMPNO>
    <ENAME>WARD</ENAME>
    <JOB>SALESMAN</JOB>
    </ROW>
    </ROWSET>
    I hope someone can help me!
    null

    This occurs when you mismatch the xsu jar file with the classes1x.zip file (the jdbc driver).
    xsu12.jar goes with classes12.zip
    xsu111.jar goes with classes111.zip

  • Error: Unparseable date with OracleXMLSave

    Hi,
    Error:
    oracle.xml.sql.OracleXMLSQLException: java.text.ParseException: Unparseable date: "03/18/2099"
    int oracle.xml.sql.dml.OracleXMLSave.insertXML(org.w3c.dom.Document)
    void b2b.RcvQueueListener.saveCsmToTso(oracle.xml.parser.v2.XMLDocument)
    void b2b.RcvQueueListener.<init>()
    void b2b.RcvQueueListener.main(java.lang.String[])
    I've tried to save a row in the database with OracleXMLSave:
    I use JDeveloper 3.1.1.2 with XDK 2.? and a local Oracle 8.1.6 unde NT.
    // XML Doc:
    <ROWSET>
    <ROW NUM="1">
    <CSM_NO>A29912</CSM_NO>
    <CRE_DAY_CSM>03/18/2099</CRE_DAY_CSM>
    <CSM_VOL_GRO_FRZ>59.89</CSM_VOL_GRO_FRZ>
    </ROW>
    </ROWSET>
    // Set java enviroment:
    Locale.setDefault(java.util.Locale.US);
    // Save Data with XSU like:
    OracleXMLSave sav =
    new OracleXMLSave(cn.getConnection(), "consignment_t");
    sav.insertXML(csmData);
    Same Error when trying to...
    (1) set date format for OracleXMLSave:
    > sav.setDateFormat("DD/MM/YYYYY");
    (2) set database parameter:
    > nls_date_format='DD/MM/YYYY';
    > nls_language='AMERICAN';
    (3) set registry (winnt)
    > nls_lang=AMERICAN_AMERICA.WEISO8859P1
    Help would be appreciated.
    Thanks in advance!
    Matthias.

    setDateFormat() is expecting a format mask that is valid for the java.text.SimpleDateFormat object.
    So, just do:
    setDateFormat("d/M/yyyy");
    null

  • Using XSU for Storing XML data

    Please how can I use the XSU API for storing XML documents in Oracle8i? I know part of the code to store a document but how do I import the XSU API?
    Do I have to download it or use it via Oracle?
    example:
    String xmlDoc = "my_xml_document";
    Connection conn = >>DriverManager.getConnection(...);
    OracleXMLSave sav = new OracleXMLSave
    (conn,"purchaseOrderTab");
    sav.insertXML(xmlDoc);But how do I use OracleXMLSave? How do I import the XSU API?
    thanks for your help
    null

    What is XSU? I think you question should be posted at the XML or XDK forum.

  • Answer: OracleXMLSave and SDO_GEOMETRY type

    I am generating XML data from table that contains SDO_GEOMETRY datatype using XSU utility, it works fine.
    But then I trying to insert those data into other table with exactly same structure using OracleXMLSave.insertXML(..) it returns following error:
    oracle.xml.sql.OracleXMLSQLException: 'getArrayVal: Internal Error -- '8 != 2'' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    int oracle.xml.sql.dml.OracleXMLSave.saveXML(org.w3c.dom.Document, int)
    int oracle.xml.sql.dml.OracleXMLSave.saveXML(java.net.URL, int)
    int oracle.xml.sql.dml.OracleXMLSave.insertXML(java.net.URL)
    void ca.teranet.db.xml.ProcessXML.main(java.lang.String[])
    Process exited with exit code 1.
    When I comment out sdo_geometry datatype it works fine.
    table
    Name Type
    GDO_GID NUMBER(38)
    TERA_GID VARCHAR2(14)
    TYPE VARCHAR2(1)
    POLBLK VARCHAR2(5)
    LRO_ID VARCHAR2(2)
    CREATE_DATE DATE
    RETIRE_DATE DATE
    STATE VARCHAR2(1)
    GEOM MDSYS.SDO_GEOMETRY
    GM_TEXT BLOB
    TEXT_ANGLE FLOAT(126)
    LABEL VARCHAR2(50)
    FCODE VARCHAR2(20)
    ORA_VALID VARCHAR2(10)
    SDE_VALID VARCHAR2(1)
    XML File:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <GDO_GID>158</GDO_GID>
    <TERA_GID>000030060</TERA_GID>
    <TYPE>P</TYPE>
    <POLBLK>00003</POLBLK>
    <LRO_ID>41</LRO_ID>
    <CREATE_DATE>6/6/1996 13:54:51</CREATE_DATE>
    <RETIRE_DATE NULL="TRUE"/>
    <STATE>C</STATE>
    <GEOM>
    <SDO_GTYPE>2001</SDO_GTYPE>
    <SDO_SRID>8265</SDO_SRID>
    <SDO_POINT>
    <X>-80.8255177207051</X>
    <Y>42.9976199216779</Y>
    <Z NULL="TRUE"/>
    </SDO_POINT>
    <SDO_ELEM_INFO NULL="TRUE"/>
    <SDO_ORDINATES NULL="TRUE"/>
    </GEOM>
    <GM_TEXT>C9FFD20FBC8CCF11ABDE08003601B769982C4748D53454C0E4B87402B27F45400000000000000000D60D50692694284000000000000000000000000000000000000000000000F03F0000010009000000303030303330303630</GM_TEXT>
    <TEXT_ANGLE NULL="TRUE"/>
    <LABEL>000030060</LABEL>
    <FCODE>TOWPCE</FCODE>
    <ORA_VALID>Y</ORA_VALID>
    <SDE_VALID>Y</SDE_VALID>
    </ROW>
    </ROWSET>
    I appreciate any comments.
    Thanks
    George.
    Answer:
    The code works fine on 9iR2 Database. Would you please specify the XSU version, Database Version and JDBC libs Version?

    I've tried to investigate more.
    I've created folloving DB object in SCOTT schema
    create type emp_col as array(100) of varchar2(10);
    create type o_emp as object (
    empname varchar2(10),
    empaddres varchar2(10),
    empcol emp_col);
    create table obj_emp (
    id number,
    info o_emp);
    and I've used same java code to insert attached XML file into obj_emp table:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <ID>1</ID>
    <INFO>
    <EMPNAME>bbbb</EMPNAME>
    <EMPADDRES NULL="TRUE"/>
    <EMPCOL>
    <EMPCOL_ITEM>111</EMPCOL_ITEM>
    <EMPCOL_ITEM>222</EMPCOL_ITEM>
    </EMPCOL>
    </INFO>
    </ROW>
    </ROWSET>
    And I found inconsistent behaviour:
    if type emp_col is defined as array of varchar2 it is OK
    if I've changed emp_col type to array of number - it returned same ugly error:
    oracle.xml.sql.OracleXMLSQLException: 'getArrayVal: Internal Error -- '8 != 2'' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2298)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2175)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1264)
         at ca.teranet.db.xml.ProcessXML2.main(ProcessXML2.java:20)
    Note. Spatial type SDO_GEOMETRY is contains SDO_ELEM_INFO type that is array of number.
    Could you someone explain this?
    Thanks
    George.

  • Inserting data in table using XSU's command line interface

    I have this XML document to store:
    <?xml version="1.0" ?>
    - <ROWSET>
    - <CustOrder>
    <OrderID>1</OrderID>
    - <Customer>
    <Name>Shirley Cohen</Name>
    <Address>2425 skylane, Dallas, TX</Address>
    <Phone>615-414-4112</Phone>
    </Customer>
    - <ItemList>
    - <Item num="1">
    <ProductID>111</ProductID>
    <ProductName>Computer</ProductName>
    <Quantity>2</Quantity>
    <Price>2000</Price>
    </Item>
    - <Item num="2">
    <ProductID>113</ProductID>
    <ProductName>Monitor</ProductName>
    <Price>865</Price>
    </Item>
    </ItemList>
    </CustOrder>
    </ROWSET>
    I have created the table custorder (below) to store the above XML document shown below:
    create or replace type CustObj as object
         Name varchar2(40),
         Address varchar2(70),
         Phone varchar2(20)
    create or replace type Item as object
         ProductID number,
         ProductName varchar2(50),
         Quantity number,
         Price number
    --create type Items as table of Item;
    create table CustOrder
         OrderID number,
         Customer CustObj,
         ItemList Items
    ) nested table ItemList store as nested_itemlist;
    However, using the following command in XSU; I get this error:
    --THE COMMAND
    C:\Documents and Settings\SKOS>java OracleXML putXML -user "samuel/samuel" -fil
    eName "\ProjectDocuments\myXMLStore\temp.xml" "custorder"
    --THE ERROR MESSAGE
    file:/C:/ProjectDocuments/myXMLStore/temp.xml<Line 1, Column 11>: XML-0109: (Fat
    al Error) PI names starting with 'xml' are reserved.
    oracle.xml.sql.OracleXMLSQLException: PI names starting with 'xml' are reserved.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2173)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1264)
    at OracleXML.Put_XML(OracleXML.java:467)
    at OracleXML.ExecutePutXML(OracleXML.java:389)
    at OracleXML.main(OracleXML.java:177)
    Can anyone please let me know what I am doing wrong? Thanks

    Please remove the xml declaration,
    <?xml version="1.0" ?>, from the xml document.

  • !!!about xsu error

    hi, everyone
    when i insert xml to db by xsu, the following error happened.
    oracle.xml.sql.OracleXMLSQLException: oracle.jdbc.driver.OraclePreparedStatement
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2258)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
    could you help me to resolve it. thanx
    The following is my code......
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:name/passwd@localhost:1521:sid");
    OracleXMLSave sav = new OracleXMLSave(conn, tabName);
    rowCount = sav.insertXML(XMLStr);

    Rohan17,
    This forum is for questions regarding Microsoft Project customization.  Are you using Microsoft Project?
    If you are using Project, please re-post with much greater detail - what release of Project.
    If your question is about .Net, the forum below is more relevant.
    http://forums.asp.net/

  • XSU Insert Problem with ORA-00001

    Hi,
    I am writing an application which will extract a series of tables from a source database and then populate a target database.
    I am using the XSU utility to extract each table individually into its own physical XML file.
    The extraction goes well, but on some tables the population has a problem.
    During the population process, the OracleXMLSave utility throws an exception:
    Error in loadFile oracle.xml.sql.OracleXMLSQLException: Exception 'java.sql.SQLException:ORA-00001: unique constraint (MYDB.SYS_C001346) violated encountered during processing ROW element 97All prior XML row changes were rolled back. in the XML document.
    I know for a fact that there is no duplicate primary key entries in the physical xml file.
    I am using the XSU - XSU12_ver2_1_0_beta with JDBC2.0 (JDK1.3 and loadable into Oracle8.1.7
    Has anyone seen this?
    I am at a critical point in the project. Any help appreciated.
    Mario Andreoli
    ComponenTech.com
    [email protected]

    Hi,
    I am writing an application which will extract a series of tables from a source database and then populate a target database.
    I am using the XSU utility to extract each table individually into its own physical XML file.
    The extraction goes well, but on some tables the population has a problem.
    During the population process, the OracleXMLSave utility throws an exception:
    Error in loadFile oracle.xml.sql.OracleXMLSQLException: Exception 'java.sql.SQLException:ORA-00001: unique constraint (MYDB.SYS_C001346) violated encountered during processing ROW element 97All prior XML row changes were rolled back. in the XML document.
    I know for a fact that there is no duplicate primary key entries in the physical xml file.
    I am using the XSU - XSU12_ver2_1_0_beta with JDBC2.0 (JDK1.3 and loadable into Oracle8.1.7
    Has anyone seen this?
    I am at a critical point in the project. Any help appreciated.
    Mario Andreoli
    ComponenTech.com
    [email protected]

  • How to update Nested tables with xsu

    Hello,
    I have three tables.
    1) DEPARTMENT_TAB
    2) EMPLOYEE_TYP
    3) ADDRESS_TYP
    ADDRESS_TYP is a collection and it is nested inside EMPLOYEE_TYP.
    EMPLOYEE_TYP is a collection and it is nested inside DEPARTMENT_TAB.
    created with below scropt
    CREATE TYPE ADDRESS_TYP AS OBJECT (CITY VARCHAR2(10), STATE VARCHAR2(2));
    CREATE TYPE ADDRESS_TYP_NT AS TABLE OF ADDRESS_TYP;
    CREATE TYPE EMPLOYEE_TYP AS OBJECT (EMPNO NUMBER(4), ENAME VARCHAR2(10), ADDRESS_VAR ADDRESS_TYP_NT);
    CREATE TYPE EMPLOYEE_TYP_NT AS TABLE OF EMPLOYEE_TYP;
    CREATE TABLE DEPARTMENT_TAB (DEPTNO NUMBER(4), DNAME VARCHAR2(10), EMPLOYEE_VAR EMPLOYEE_TYP_NT)
         NESTED TABLE EMPLOYEE_VAR STORE AS EMPLOYEE_TAB
         ( NESTED TABLE ADDRESS_VAR STORE AS ADDRESS_TAB);
    I inserted two rows in DEPARTMENT_TAB and their nested tables using normalsql. and i generated below xml content using XSU java API
    oracle.xml.sql.query.OracleXMLQuery
    My Question is How to UPDATE a row in ADDRESS_TAB using XSU java API
    oracle.xml.sql.dml.OracleXMLSave.
    (When i was trying to update address_tab nested table's row with xml input file. it is deleting other existing rows)
    Thanks.

    Why do you say it does not work?

  • JDBC equivalent of OracleXMLSave.setDateFormat()?

    The Orace XSU class OracleXMLSave has a method setDateFormat().
    How can I accomplish the equivalent in JDBC?
    The NSL_DATE_FORMAT of my server "RRRR-MM-DD HH24:mm:ss"
    I have a bunch of ASCII files I'm trying to load which have "MM/DD/YYYY" format.
    In PL/SQL and/or Oracle XSU I just set the date format and then execute something like
    insert into myfile columns ( mydatecol ) values '01/01/1999' )
    However, when using JDBC I haven't figured out how to set the date format for the session/connection/whatever globally.
    I know I can use JDBC date escaping BUT that requires I know which columns are dates. If I can just set the format for the session to match the load file I only have to provide columns names and values (as strings).
    R.Parr
    Temporal Arts

    None by default.
    You could use REF CURSOR as an OUT parameter of a stored procedureCREATE OR REPLACE PACKAGE myPkgGetCursor IS
        TYPE recSet IS REF CURSOR;
        PROCEDURE getList( recList  OUT  recSet, param1  IN NUMBER);
    END myPkgGetCursor;
    CREATE OR REPLACE PACKAGE BODY myPkgGetCursor AS
        PROCEDURE getList( recList  OUT  recSet, param1  IN NUMBER) IS
        BEGIN
            OPEN recList FOR <queryStatement>;
        END getList;
    END myPkgGetCursor;Use CallableStatement and specify myPkgGetCursor.getList

  • JDBC and XSU

    Recently we have set up a JDBC connection to a SQL Server 2000 DB. Using java at the command line I can pull out information from our database but if you use OracleXMLSave and try to push to the databse it gives an OracleXMLSQLException. Any ideas of why you can pull info out but not push info in from the XSU API. Thanks,
    Matthew

    I think you've specified a JDBC-ODBC-Bridge as Database-URL. You
    should use the following information to establish a connection
    with JDBC and Oracles ;thin driver+ :
    driver = "oracle.jdbc.driver.OracleDriver"
    dburl = "jdbc:oracle:thin:@yourhost:1521:yourSID"
    (change the according parts)
    You can take the authentication information user/pass also
    inside the dburl:
    dburl = "jdbc:oracle:thin:user/pass@yourhost:1521:yourSID"
    Alex

  • XSLT on very large documents w/XSU

    Hi:
    I need to load some very large documents, and I am looking at the example in Ch. 14 (14-4?) of the Muench book. It looks fine, but my question is that if, for instance, the element names don't match the table column names, and I need to use XSLT to change them, can I "stream" this? I am afraid that since XSLT wants to work on a "tree", it will want me to tranform the 6 gig (e.g.) file before passing it to the SAX parser. Is this correct? Can I make "mini" trees inside the multitableInsertHandler and work off of those one at a time? Can I do something like "XMLSave.applyStylesheet" (whatever it is) on a doc. from XMLDocumentSplitter? Complex question(s) I know. I think I am close, but missing the obvious.
    Thanks.
    Mike
    null

    Thanks for the clarification. I am planning on having one "rowset" element,and many "row" elements, each of which would have a "table" and "operation" attribute, because I am trying to mirror another database via its log file. Each row will be an insert/update/delete for one of several tables. Do you see a problem with this approach (i.e., doing away with most of the "rowset" elements)? I don't plan on batching at this point.
    On batching: If I did batch, and if the transaction fails, and I get a vector back where everything is set to (-1) or whatever it does, how do I know which records in the transaction actually succeeded?
    Thanks again,
    Mike
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Yes. The Multitable insert handler transforms one "subdocument" at a time using XSLT into a multitable-insert document. The result isn't processed directly by XSU, but is processed by some code in the example that iterates the resulting <ROWSET table="xxx"> tags and "choreographs" the use of an OracleXMLSave for each target table.
    Steve Muench
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    <HR></BLOCKQUOTE>
    null

  • Errors loading XSU

    8.1.6
    JDK 1.2 or 1.1.6
    When when running the XSU install script loadjava fails with:
    ORA-29534: referenced object SCOTT.oracle/xml/sql/dml/OracleXMLSave could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/dml/OracleXMLSave could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/dml/OracleXMLSave could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/dml/OracleXMLSave could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/dml/OracleXMLSave could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/dml/OracleXMLStaticSave could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/query/OracleXMLQuery could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/query/OracleXMLQuery could not be resolved
    ORA-29534: referenced object SCOTT.oracle/xml/sql/query/OracleXMLStaticQuery could not be resolved
    All of the above objects exist in an invalid state in the scott schema and will not complile successfully. I feel I'm probably missing somthing from my classpath but unable to determine what it is. What is the technique for determining what I'm missing?

    Never mind... I found the answer, I was trying to load the wrong level of the XSU for 8.1.6.

  • OracleXMLSave error

    Hi.
    I get an error when I try to insert a huge XML file (30MB) into Oracle DB using Oracle XML Utility for Java.
    Here is a segment of my Java code :
    OracleXMLSave save = new OracleXMLSave(conn, tableName);
    url = new URL("file:///" + xmlFile.getAbsolutePath());
    rowCount = save.insertXML(url);
    save.close();
    Here is error msg :
    # An unexpected exception has been detected in native code outside the VM.
    # Program counter=0x404b44a7
    # Problematic Thread: prio=1 tid=0x804ede0 nid=0x66c5 runnable
    # # An unexpected exception has been detected in native code outside the VM.# Program counter=0x404741a3
    # Problematic Thread: prio=1078150424 tid=0x804ede0 nid=0x66c5 runnable
    Aborted
    I'm not sure if there is a limit of XML file size for doing this.
    It works well when XML file size is smaller.(less than 10MB)
    Please, let me know if you have any idea.
    Thanks.
    null

    Thanks, Steve.
    You're great.
    I checked your book.
    But, I was not able to match my case to your case.
    Because, my huge XML file is just for one table.
    For example, like this :
    * My XML sample
    <ROWSET>
    <ROW>
    <ID>...</ID>
    <NAME>...</NAME>
    (30~50 column tags here)
    </ROW>
    <ROW>
    <ID>...</ID>
    <NAME>...</NAME>
    (30~50 column tags here)
    </ROW>
    Thousands of <ROW> tags here
    </ROWSET>
    I mean, one XML file is loaded into only one table.
    So, your split-XML file techniq cannot be applied to my case.
    But, I'd like to try this way :
    - split the huge XML file(document) into two xml document with same format above.
    - load each splitted-XML Doc.
    Steve, could you give me some sample java code to do this?
    My idea to split the huge XML file is to count the number of node with tag-name "ROW",
    and the count is reached 500 or 1000 then make additional xml document...
    And, as you know, the problem was that the XML file is too big to be loaded.
    I tried this way also :
    java -mx256m OracleXML ...
    It solves "OutofMemory error", but it doesn't solve the OracleXMLSave problem.
    It seems to me that the huge XML file is parsed well but cannot be inserted with
    OracleXMLSave().
    And, as you know also, when I try with the latest version of XSU(v9.x.x...), it got the conversion error.
    Anyway, when can we get the new version of XSU without these errors?
    Thank you very much, again.
    null

  • OracleXMLSave - savepoint?

    How do I fix this error?
    oracle.xml.sql.OracleXMLSQLException: ORA-01086: savepoint 'SYS_XSU_HOPE_0001000' never established
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1967)
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1880)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1013)
    at test.main(test.java:563)

    I found out that this error was caused because there were existing data on the target tables. So, this error fixed.
    Anyway, Yes, I'm using the latest version of XDK and XSU.
    But, I have another error which I posted before.
    Here is copy of that msg.
    I get an error when I try to insert a huge XML file (30MB) into Oracle DB using Oracle XML Utility for Java.
    Here is a segment of my Java code :
    OracleXMLSave save = new OracleXMLSave(conn, tableName);
    url = new URL("file:///" + xmlFile.getAbsolutePath());
    rowCount = save.insertXML(url);
    save.close();
    Here is error msg :
    # An unexpected exception has been detected in native code outside the VM.
    # Program counter=0x404b44a7
    # Problematic Thread: prio=1 tid=0x804ede0 nid=0x66c5 runnable
    # # An unexpected exception has been detected in native code outside the VM.# Program counter=0x404741a3
    # Problematic Thread: prio=1078150424 tid=0x804ede0 nid=0x66c5 runnable
    Aborted
    I'm not sure if there is a limit of XML file size for doing this.
    It works well when XML file size is smaller.(less than 10MB)
    null

Maybe you are looking for

  • Buying songs to convert in Ringtones

    I bought some songs in the iTunes store that were marked as ringtone capable. I wanted to make a ringtone, but the ITunes (software) gave the following message: THIS SONG CANNOT BE MADE INTO A RINGTONE - the song - CAN NO LONGER BE MADE INTO A RINGTO

  • How to pay a supplier

    Hi, I have to valid the invoice and pay a supplier in FF module, but I don't know how to do that, somebody can help me?? Thanks for your help

  • How to create search function (af:query) using method in java

    hi All..:) i got problem with search custom (af:query), how to create search function/ af:query using method in java class? anyone help me.... thx agungdmt

  • Plugging in ipod

    Is it true that the first time you open up itunes you have to plug in your ipod nano? Do i need a 2.0 usb?

  • OC4J : Log4JLogger does not implement Log

    Hi All, I would like to have some information regarding the "does not implement Log" problem which occurs when I deploy my ear application. I use OC4J 10.1.3.0 version and when I try to deploy my ear by having "search-local-classes-first" option as "