Error opening external DTD 'Segnatura.dtd' using dbms_xmlsave.insertXML

I've been trying to insert a document in a table. All works fine
if the xml doesn't contains the doctype element!
If I add the row
<!DOCTYPE Segnatura SYSTEM "Segnatura.dtd">
to my xml I get the error:
oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
'Segnatura.dtd'.
If I specify all the path "file:///temp/Segnatura.dtd" the insert
works, but I don't want to do in that way beacause I don't want
to modify the original xml that i'm inserting!
In the package dbms_xmlsave I have no ways to change the
basedir/baseurl
or to setValidationMode to false like in xmlparser package.
Is there any way to solve this problem??
Thank's in advance
Mauro
This is an example scratch of my xml doc:
<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<!DOCTYPE Segnatura SYSTEM "Segnatura.dtd">
<Segnatura versione="2001-05-07"
xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="it">
</Segnatura>

Hy Steven, thank's for your attention.
I'm not using the xsql servlet.
I'm reading an xml file coming from the file system and I want to
import it in the db using a java stored proc.
I also have the dtd file (Segnatura.dtd) but I don't know where
to put in on the server.
If I run my java program and I put Segnatura.dtd in the execution
classpath on the program the xml is loaded fine.
If I load the stored proc in the db then I don't know where to
put the dtd. Do I have to put the directory containing the dtd in
the server classpath and the restart the db maibe?
thank's
mauro

Similar Messages

  • Error opening external DTD 'book.dtd'

    I know this may be something simple, but can't get it to work. I have a local (on my local network) dtd file that I'm trying to use for validation on my xml file.
    My first two lines in the xml are:
    <?xml version="1.0" ?>
    <!DOCTYPE book SYSTEM "D:\tmp\book.dtd">
    When trying to parse it in Java, I get the exception thrown of:
    Error opening external DTD 'book.dtd'.
    I checked, and the file has full permissions for read and write, and it is in the directory specified.
    How can I use an external dtd file on my local network for my DTD validation?
    Thanks in advance!
    null

    Try using PUBLIC instead of SYSTEM.
    Oracle XML Team

  • Error opening external DTD

    I get the error above when doing the following
    import oracle.xml.parser.v2.DOMParser;
    public class testXML

    I do not know how do you pass the JDK compiler.Typos in the transcription process. I was more interested in showing my approach rather than precise code (apologies).
    Actual code below - less 2 methods I have not changed.
    Andrew
    =======================
    import java.net.URL;
    import org.w3c.dom.Node;
    import org.w3c.dom.Element;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.NamedNodeMap;
    //import oracle.xml.parser.v2.DOMParser;
    //import oracle.xml.parser.v2.XMLDocument;
    import java.io.*;
    import org.xml.sax.*;
    import org.apache.xerces.parsers.DOMParser;
    public class DOMSample
    static public void main(String[] argv)
    try
    if (argv.length != 1)
    // Must pass in the name of the XML file.
    System.err.println("Usage: java DOMSample <xml file>");
    System.exit(1);
    // Get an instance of the parser
    DOMParser parser = new DOMParser();
    // Oracle's Way - gives an error "Error opening external DTD"
    // Set various parser options: validation on,
    // warnings shown, error stream set to stderr.
    // parser.setErrorStream(System.err);
    // parser.setValidationMode(DOMParser.DTD_VALIDATION); <-- deprecated ??
    // parser.showWarnings(true);
    // Parse the document
    // System.out.println("Parsing XML document and do DTD Validation...");
    // System.err.println("Parser version " + parser.getReleaseVersion());
    // parser.parse(DemoUtil.createURL(argv[0]));
    // My way - using Xerces - works, using an input source with Oracle way also fails
    File file = new File ("c:\\temp2\\javFilterDat.xml");
    InputSource is = new InputSource( new FileReader(file));
    is.setSystemId("file:/c:"+ System.getProperty("file.separator") +
    "temp2");
    parser.parse(is);
    // Obtain the document.
    Document doc = parser.getDocument();
    // Print document elements
    System.out.print("The elements are: ");
    printElements(doc);
    // Print document element attributes
    System.out.println("The attributes of each element are: ");
    printElementAttributes(doc);
    catch (Exception e)
    System.out.println(e.toString());

  • ORA-20100: Error occurred while parsing:Error opening external DTD ( Asap)

    Hi I'm using domsample example. And I have written the program. The xml file at the starting has this string"<!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">", from which I'm getting error -"ORA-20100: Error occurred while parsing: Error opening external DTD".
    I'm new to xml could you please help me to solve this problem. I assume this is related to DTD for which I need to set base path. But I'm not sure how to do it? I'm getting this xml file through CLOB which I'm able to parse until an extent. where in between got this error.
    Here is my partial code:
    l_doc_id := rec_xml_data.id;
    l_xml_parser := xmlparser.newParser;
    xmlparser.setValidationMode(l_xml_parser, FALSE);
    xmlparser.parseCLOB(l_xml_parser,rec_xml_data.l_xml_data);--PARSING THE CLOB WHICH CONTAINS XML FILE
    l_xml_doc := xmlparser.getDocument(l_xml_parser);
    xmlparser.freeParser(l_xml_parser);
    l_nodelist := xmldom.getElementsByTagName(l_xml_doc, '*');
    l_length := xmldom.getLength(l_nodelist);
    -- loop through elements
    FOR l_rec_xml in 0..l_length-1
    LOOP
    l_node := xmldom.item(l_nodelist, l_rec_xml);
    -- dbms_output.put(xmldom.getNodeName(n) || ' ');
    -- get the text node associated with the element node
    l_nodename:=xmldom.getNodeName(l_node);
    l_node := xmldom.getFirstChild(l_node);
    IF (xmldom.isNull(l_node) = false) THEN
    IF xmldom.getNodeType(l_node) = xmldom.TEXT_NODE THEN
    IF l_nodename = 'purchase-order-number' THEN
    l_po_num:=NULL;
    l_po_num:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Purchaser Order Num : '||l_po_num);
    END IF;
    from here onwards I get the string values
    Now I don't know where to set the DTD basepath or baseurl. I need it asap.
    Regards,
    Naveen.

    The version which I'm working on is 10.2.0.4.
    XML File---
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    <MobileInventoryResponse>
    <message>
    <message-header>
    <message-id>16244182</message-id>
    <transaction-name>ship-advice</transaction-name>
    <partner-name>cbeyond</partner-name>
    <source-url>http://www.brightpoint.com</source-url>
    <create-timestamp>20080826150709</create-timestamp>
    <response-request>1</response-request>
    </message-header>
    <ship-advice>
    <header>
    <customer-id>297859</customer-id>
    <shipment-information>
    <ship-first-name>RA_13Aug_1</ship-first-name>
    <ship-last-name>MIND</ship-last-name>
    <ship-address1>test</ship-address1>
    <ship-city>test</ship-city>
    <ship-state>VA</ship-state>
    <ship-post-code>22102-4931</ship-post-code>
    <ship-country-code>US</ship-country-code>
    <ship-phone1>0040726335068</ship-phone1>
    <ship-email>[email protected]</ship-email>
    <ship-via>FX01</ship-via>
    <ship-request-date>20080826</ship-request-date>
    <ship-request-warehouse>CBY1</ship-request-warehouse>
    </shipment-information>
    <purchase-order-information>
    <purchase-order-number>380928</purchase-order-number>
    <account-description />
    <purchase-order-amount>0.0</purchase-order-amount>
    <currency-code>USD</currency-code>
    </purchase-order-information>
    <order-header>
    <customer-order-number>0002759</customer-order-number>
    <customer-order-date>20080826</customer-order-date>
    <order-sub-total>19.0</order-sub-total>
    <order-discount>0.0</order-discount>
    <order-tax1>0.0</order-tax1>
    <order-tax2>0.0</order-tax2>
    <order-tax3>0.0</order-tax3>
    <order-shipment-charge>18.0</order-shipment-charge>
    <order-total-net>0.0</order-total-net>
    <order-status>Completed</order-status>
    <order-type />
    <brightpoint-order-number>35028788</brightpoint-order-number>
    <warehouse-id>CBY1</warehouse-id>
    <ship-date>20080826</ship-date>
    </order-header>
    </header>
    <detail>
    <line-item>
    <line-no>1</line-no>
    <item-code>SKU1</item-code>
    <universal-product-code>0</universal-product-code>
    <ship-quantity>1.0</ship-quantity>
    <unit-of-measure>EA</unit-of-measure>
    <serial-list>
    <serial-numbers>
    <esn>TIMI000013</esn>
    </serial-numbers>
    </serial-list>
    <line-status />
    <base-price>0.0</base-price>
    <line-discount>0.0</line-discount>
    <line-tax1>0.0</line-tax1>
    <line-tax2>0.0</line-tax2>
    <line-tax3>0.0</line-tax3>
    <bill-of-lading>929406733828</bill-of-lading>
    <scac>FX01</scac>
    </line-item>
    </detail>
    </ship-advice>
    <transactionInfo>
    <eventID>16244182</eventID>
    </transactionInfo>
    </message>
    </MobileInventoryResponse>
    XML FILE END--------------------
    MY PROGRAM IS AS BELOW---
    get_eai_data_prc( x_ret_code OUT NUMBER
    ,p_debug_flag IN VARCHAR2
    IS
    --Local Variables
    l_xml_parser xmlparser.Parser;
    l_xml_doc xmldom.DOMDocument;
    l_xml_data CLOB;
    l_nodelist xmldom.DOMNodeList;
    l_length NUMBER := 0;
    l_num_cnt NUMBER := 0;
    l_node xmldom.DOMNode;
    l_docelem DBMS_XMLDOM.DOMElement; -- XML DOM element.
    l_nodeValue VARCHAR2(30); -- Text value of the node.
    l_nodename VARCHAR2(100);
    l_po_num VARCHAR2(150);
    l_account_desc VARCHAR2(150);
    l_cust_ord VARCHAR2(150);
    l_ship_date VARCHAR2(150);
    l_item_code VARCHAR2(150);
    l_ship_qty VARCHAR2(150);
    l_esn VARCHAR2(150);
    l_cust_channel_type VARCHAR2(150);
    l_cust_grp_acct VARCHAR2(150);
    l_max_doc_id NUMBER;
    l_doc_id NUMBER;
    l_market_id VARCHAR2(150);
    l_record_id VARCHAR2(30);
    TYPE l_esn_table IS TABLE OF VARCHAR2(30)
    INDEX BY BINARY_INTEGER;
    l_data l_esn_table;
    --CURSOR TO GET XML DATA FROM EAI
    CURSOR cur_xml_data(p_doc_id VARCHAR2)
    IS
    SELECT id
         ,document l_xml_data
    FROM tds_xml_store_temp
    WHERE id >= id ;
    BEGIN
    FOR rec_xml_data IN cur_xml_data(l_max_doc_id)
    LOOP
    l_doc_id := rec_xml_data.id;
    l_xml_parser := xmlparser.newParser;
    xmlparser.setValidationMode(l_xml_parser, FALSE);
    xmlparser.parseCLOB(l_xml_parser,rec_xml_data.l_xml_data);
    l_xml_doc := xmlparser.getDocument(l_xml_parser);
    xmlparser.freeParser(l_xml_parser);
    l_nodelist := xmldom.getElementsByTagName(l_xml_doc, '*');
    l_length := xmldom.getLength(l_nodelist);
    -- loop through elements
    FOR l_rec_xml in 0..l_length-1
    LOOP
    l_node := xmldom.item(l_nodelist, l_rec_xml);
    -- dbms_output.put(xmldom.getNodeName(n));
    -- get the text node associated with the element node
    l_nodename:=xmldom.getNodeName(l_node);
    l_node := xmldom.getFirstChild(l_node);
    IF (xmldom.isNull(l_node) = false) THEN
    IF xmldom.getNodeType(l_node) = xmldom.TEXT_NODE THEN
    IF l_nodename = 'purchase-order-number' THEN
    l_po_num:=NULL;
    l_po_num:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Purchaser Order Num : '||l_po_num);
    END IF;--purchase-order-number
    IF l_nodename = 'account-description' THEN
    l_account_desc :=NULL;
    l_account_desc := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-channel-type' THEN
    l_cust_channel_type:=NULL;
    l_cust_channel_type:= xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-group-account' THEN
    l_cust_grp_acct := NULL;
    l_cust_grp_acct := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'customer-order-number' THEN
    l_cust_ord:=NULL;
    l_cust_ord:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Customer Order NUm : '||l_cust_ord);
    END IF;--customer-order-number
    IF l_nodename = 'ship-date' THEN
    l_ship_date:=NULL;
    l_ship_date:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Ship Date : '||to_date(l_ship_date,'YYYY-mm-dd'));
    END IF;--ship-date
    IF l_nodename = 'item-code' THEN
    l_item_code:=NULL;
    l_item_code:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Item Code : '||l_item_code);
    END IF;--item-code
    IF l_nodename = 'esn' THEN
    l_esn:=NULL;
    l_num_cnt := l_num_cnt + 1;
    l_esn:=xmldom.getNodeValue(l_node);
    l_data(l_num_cnt) := l_esn;
    -- dbms_output.put_line('Serial Num : '||l_esn);
    END IF;--esn
    IF l_nodename = 'market-id' THEN
    l_market_id := NULL;
    l_market_id := xmldom.getNodeValue(l_node);
    END IF;
    IF l_nodename = 'ship-quantity' THEN
    l_ship_qty:=NULL;
    l_ship_qty:= xmldom.getNodeValue(l_node);
    -- dbms_output.put_line('Ship Quantity : '||l_ship_qty);
    END IF;--ship-quantity
    END IF;--xmldom.TEXT_NODE
    END IF;
    END LOOP;--l_rec_xml
    FOR j in l_data.first..l_data.last
    LOOP
    INSERT INTO cbey_shipment_int_stg( purchase_order_number
    ,account_description
    ,customer_order_number
    ,ship_date
    ,item_code
    ,ship_quantity
    ,esn
    ,customer_channel_type
    ,customer_group_account
    ,market_id
    ,eai_xml_doc_id
    ,record_status
    ,record_id
    VALUES
    ( l_po_num
    ,l_account_desc
    ,l_cust_ord
    ,to_date(l_ship_date,'YYYY-mm-dd')
    ,l_item_code
    ,l_ship_qty
    ,l_data(j)
    ,l_cust_channel_type
    ,l_cust_grp_acct
    ,l_market_id
    ,l_max_doc_id
    ,'NEW'
    ,CBEY_RECORD_ID_SEQ_S.nextval
    END LOOP;--j
    UPDATE cbey_interface_run_log
    SET request_id = l_conc_req_id
    ,lastrun_date = SYSDATE
    ,doc_id = rec_xml_data.id
    WHERE program_id = 'SHIPMENT_INT'
    AND doc_id =l_max_doc_id;
    l_data.delete;
    l_num_cnt :=0;
    END LOOP; --rec_xml_data
    COMMIT;
    END of the Procedure--------------------------
    Now if I load the xml file without the this :- <!DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd">
    it works well. But it gives error when this particular thing is there.
    Regards,
    Naveen
    Edited by: MAN on Oct 17, 2008 7:28 AM

  • Using dbms_xmlsave.insertXML

    Hi all,
    I am reading an XML data which has similar structure to:
    <dept>
    <name> department name </name>
    <loc> department location </loc>
    <emp>
    <fisrt> first name for first employee </first>
    <last> last name for first employee </last>
    </emp>
    <emp>
    <first> first name for second employee </first>
    <last> last name for second employee </last>
    </emp>
    </dept>
    I do not have control on the structure of the XML data as I am reading it from external source. Now I have created a table as follows:
    SQL> create type emprec as object (
    first varchar2(30),
    last varchar2(30)
    SQL> create type empreclist as table of emprec;
    SQL> create table mydept (
    name varchar2(30),
    loc varchar2(50),
    emp empreclist);
    Now when I use the dbms_xmlsave.insertXML , the columns name,loc are populated but the column emp is not populated and i I define the emp column as (emprec) type, then only the last <emp></emp> data is inserted.
    Any ideas how to read all the <emp></emp> data into the dept table ?

    Hi,
    I have been trying for a while to get a nested collection loaded. The oracle documentation is no help. But what i did in the end is this. I built the object table, inserted the nested collection manual and then ran the command line XSU (documented in the app. dev. guide xml) to save the tabledata as XML (only one record) with the -withDTD switch. This creates a XML with inline DTD. Surprise surprise when you load that document it does work, even when you add more nested rows in the document. This XML file will also show you if you build the table correctly. It seems that XSU needs the DTD to be able to load nested collections.
    If you are running windows the command line utility can be run like this
    java -cp c:\oracle\ora81\rdbms\jlib\xsu12.jar;c:\oracle\ora81\lib\xmlparserv2.jar;c:\oracle\ora81\jdbc\lib\classes12.zip OracleXML getXML -user "username/password" -withDTD "select * from yourtable" >g:\xmlfiles\output.xml
    have fun

  • Loading data into XMLType column using dbms_xmlsave.insertxml get ORA-29532

    The following simple test case succeeded in 9.2.0.1 but failed in 9.2.0.2.
    CREATE OR REPLACE procedure InsertXML(xmlDoc IN VARCHAR2, tableName IN VARCHAR2) is
    insCtx DBMS_XMLSave.ctxType;
    rows number;
    begin
    insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
    rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    dbms_output.put_line(to_char(rows) || ' rows inserted');
    DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    end;
    CREATE TABLE XMLtable
    (column1 xmltype)
    exec insertxml('<?xml version = "1.0"?><ROWSET><ROW><COLUMN1><TEST>HELLO</TEST></COLUMN1></ROW></ROWSET>', 'XMLTABLE');

    Hi,
    For your XML file I think you just need to enclose XML elemnts in ROWSET AND ROW TAGS - so xml should look like :
    <ROWSET>
    <ROW>
    <DEPT>
    </DEPT>
    and just pass it as CLOB to dbms_xmlsave.insertXML proc.
    I hope it should work.
    I am also trying to insert XML file but with a bit complex structure having multiple nested elements.
    I am not sure how to transform the external XML file to wrap it in ROWSET/ROW using XSLT. It's mandatory to use ROWSET/ROW tags to be able to insert in oracle tables. I am facing this problem right now. I am using object views to accomplish the purpose but still needs to figure out the way to apply stylesheet to incoming XML file.
    If you come to know of any way, pls do let me know also.
    Thanks

  • Default insertion for missing elements using DBMS_XMLSave.insertXML

    Hi,
    I am trying to insert default values for some columns, without having those column names as elements in the xml document. Is it possible to do so?? This is the code I am using for now, but it inserts null values for missing elements in the xml document.
    insCtx := DBMS_XMLSave.newContext ('TABLENAME'); -- get the context
    rows := DBMS_XMLSave.insertXML (insCtx, p_xmlDoc); -- insert the doc
    DBMS_XMLSave.closeContext (insCtx); -- close the handle

    Only thing I noticed with dbms_xmlstore.insertXML, was when my xml document had "<?xml version = "1.0" ?>" at the start, it gave an error "LPX-00209: PI names starting with XML are reserved"That's probably due to the XML document not starting exactly with "&lt;", like this :
    SQL> DECLARE
      2
      3    xmldoc   clob := '
      4  <?xml version="1.0"?>
      5        <ROWSET>
      6       <ROW>
      7        <COL1>1</COL1>
      8        <COL2>TEST1</COL2>
      9       </ROW>
    10       <ROW>
    11       <COL1>2</COL1>
    12      </ROW>
    13     </ROWSET>';
    14
    15    ctx      dbms_xmlstore.ctxHandle;
    16    numrows  number;
    17
    18  BEGIN
    19
    20    ctx := dbms_xmlstore.newContext('MY_TABLE');
    21    numrows := dbms_xmlstore.insertXML(ctx, xmldoc);
    22    dbms_xmlstore.closeContext(ctx);
    23
    24  END;
    25  /
    DECLARE
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00209: PI names starting with XML are reserved
    ORA-06512: at "SYS.DBMS_XMLSTORE", line 78
    ORA-06512: at line 21 However, it runs OK if the prolog actually starts the character stream :
    SQL> DECLARE
      2
      3    xmldoc   clob := '<?xml version="1.0"?>
      4        <ROWSET>
      5       <ROW>
      6        <COL1>1</COL1>
      7        <COL2>TEST1</COL2>
      8       </ROW>
      9       <ROW>
    10       <COL1>2</COL1>
    11      </ROW>
    12     </ROWSET>';
    13
    14    ctx      dbms_xmlstore.ctxHandle;
    15    numrows  number;
    16
    17  BEGIN
    18
    19    ctx := dbms_xmlstore.newContext('MY_TABLE');
    20    numrows := dbms_xmlstore.insertXML(ctx, xmldoc);
    21    dbms_xmlstore.closeContext(ctx);
    22
    23  END;
    24  /
    PL/SQL procedure successfully completed.
    With the dbms_xmlsave.inserXML, [...] it wont insert the default column values.Now that's strange...
    I understand there could be differences in the parsing implementation, but in the end both processes must issue an INSERT into the target table using plain SQL, so I really wonder why default values are not applied.
    I'll try to reproduce when I have access to a Java-enabled db.

  • Can't replicate data inserted using DBMS_XMLSAVE.insertXML

    Enviroment:
    OS: SLES 10 SP2
    Database Version: 11.1.0.6
    I have configured an Oracle Streams environment compose by two database. The first is the source where a local capture process should captures dml changes from some tables. If I insert some data using a classic dml insert operation the changes are replicated without problems. The problem is when the tables are populated using the DBMS_XMLSAVE.insertXML procedure. With that implementation there isn't data replication. I think DBMS_XMLSAVE.insertXML must generate redolog so the capture process should capture the changes from them but it doesn't seems to be like that.
    I need some suggestion about this matter, thank you.

    Here you are
    CREATE TABLE TEST.HABI
    ID_DATA NUMBER,
    ID_HOCU INTEGER,
    ID_HABI INTEGER,
    DESCRIPTION VARCHAR2(1000 BYTE)
    TABLESPACE USERS
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 32M
    NEXT 80K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    I'am not performe explicit commit here you are the procedure:
    FUNCTION import(p_id_data IN INTEGER,
    p_lote IN INTEGER,
    p_fecha_hotel DATE,
    p_error IN OUT NOCOPY CLOB,
    p_hab_habi IN OUT NOCOPY CLOB,
    p_hcl_clie IN OUT NOCOPY CLOB,
    p_hcl_habi IN OUT NOCOPY CLOB,
    p_hcl_hist IN OUT NOCOPY CLOB,
    p_tel_llpr IN OUT NOCOPY CLOB) Return integer
    AS
    ctx DBMS_XMLSAVE.ctxType;
    v_rows NUMBER;
    v_err_msg VARCHAR(4000);
    v_cant integer;
    BEGIN
    IF length(p_error) > (length('<?xml version = ''1.0''?><ENL_TRAN_ERROR/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_ERROR');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_error);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_hab_habi) > (length('<?xml version = ''1.0''?><ENL_TRAN_HAB_HABI/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HAB_HABI');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hab_habi);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF (INSTR(p_hcl_clie, '&')<>0) THEN
    p_hcl_clie := replace(p_hcl_clie, '&', '&amp;');
    END IF;
    IF length(p_hcl_clie) > (length('<?xml version = ''1.0''?><ENL_TRAN_HCL_CLIE/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HCL_CLIE');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hcl_clie);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_hcl_habi) > (length('<?xml version = ''1.0''?><ENL_TRAN_HCL_HABI/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HCL_HABI');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hcl_habi);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_hcl_hist) > (length('<?xml version = ''1.0''?><ENL_TRAN_HCL_HABI_HIST/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HCL_HABI_HIST');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hcl_hist);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_tel_llpr) > (length('<?xml version = ''1.0''?><ENL_TRAN_TEL_LLPR/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_TEL_LLPR');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_tel_llpr);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    END import;
    I hope you can help me.

  • Error opening Project 2007 file after using project 2010

    This is the second time I'm experiencing this problem.
    Created a file (say Rev 1) in Project 2007 at work and took it home and updated it using Project 2010. When I finished updating using Project 2010, I saved the file in Project 2007 format. Came to work the next day, opened the file using
    Project 2007 and did a "Save As" so that I have another revision of the file (Rev 2).
    After updating Rev 2 in Project 2007 I closed it but when I came to work the next day I couldn't open Rev 2 file again either in Project 2007 or 2010. This has happened to me with 2 different files.
    The error message I get is
    An unexpected error occured during command execution.
    Try the following:
    Verify that all argumen names and values are correct and are of the correct type.
    You may have run out of memory. To free up available memory, close programs, projects, or windows that you aren't using.

    It seems to me that it has to do something with invalid characters in the file name of the timeline. Or it could be anything from an '&' to two concurrent spaces, mulitple '.' or even a dash (-). Stick with single spaces, letter and
    number combinations and you should be fine. The problems arise based on how the file has been opened. Here’s one thread like yours. It could be useful for your, read http://www.filerepairforum.com/forum/microsoft/microsoft-aa/project/625-project-error-“an-import-error-occurred”

  • PLEASE HELP!!! ESB TDM bridge error opening songs in Logic that uses ESB

    Please HELP ME!!
    I'm using logic from 12 years but now afterupdating to L8 i'm getting
    an error that crash the application after opening the arrange,
    this is not happening if a open a blank song, like my autoload template....
    one strange thing is that i'm having now 16 esb channels inputs and by default
    there is a wrong input setup as shown in the figure here under:
    http://www.oceantrax.com/ftpdownloads/gianni/esb.png
    I'm sure the problem should happen while logic is trying to set up the right configuration...
    please give me some advices......I do really need some help!!
    g.

    Gianni Bini wrote:
    Please HELP ME!!!!!
    I'm using logic from 12 years but now afterupdating to L8 i'm getting
    an error that crash the application after opening the arrange,
    this is not happening if a open a blank song, like my autoload template....
    one strange thing is that i'm having now 16 esb channels inputs and by default
    there is a wrong input setup as shown in the figure here under:
    http://www.oceantrax.com/ftpdownloads/gianni/esb.png
    I'm sure the problem should happen while logic is trying to set up the right configuration...
    please give me some advices......I do really need some help!!!!!
    g.
    Hi,
    Try trashing your Logic preference files. This might remove those ghosted duplicate ESB channels.
    Cheers

  • XML document in CLOB with reference to external DTD

    If you place the xml document in clob using dbms_lob and the document has reference to external (system) DTD then it gives an error 'Error opening external DTD'. Whats the work around. See example below...
    declare
    xmlstring CLOB;
    xmlstring1 CLOB;
    os_file BFILE := bfilename('BFILE_DIR','family.xml');
    > > > rowsp INTEGER; > > > errnum NUMBER; > > > errmsg VARCHAR2(2000);
    > > > time VARCHAR2(20); > > > begin
    > > > select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS')
    > > > into time from dual; > > > dbms_output.put_line(time);
    > > > dbms_lob.createtemporary(xmlstring, true, > > > dbms_lob.session);
    > > > dbms_lob.fileopen(os_file, > > dbms_lob.file_readonly);
    > > > dbms_lob.loadfromfile(xmlstring, os_file,
    > > > dbms_lob.getlength(os_file));
    > > > select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS')
    > > > into time from dual; > > > dbms_output.put_line(time);
    > > > xmlgen.resetOptions; > > > xmlgen.setRowTag('family');
    > > > --xmlgen.setIgnoreTagCase(xmlgen.IGNORE_CASE);
    > > > rowsp := xmlgen.insertXML('family',xmlString);
    > > > dbms_output.put_line(' Rows processed = '&#0124; &#0124; > > > TO_CHAR(rowsp));
    > > > dbms_lob.freetemporary(xmlstring);
    > > > dbms_lob.fileclose(os_file); > > > commit; > > > exception
    > > > when no_data_found then > > > rollback;
    > > > dbms_lob.freetemporary(xmlstring);
    > > > dbms_lob.fileclose(os_file); > > > errnum := abs(SQLCODE);
    > > > errmsg := SQLERRM;
    > > > dbms_output.put_line(errnum&#0124; &#0124;'----'&#0124; &#0124;errmsg); > > > when others then
    > > > rollback; > > > dbms_lob.freetemporary(xmlstring);
    > > > dbms_lob.fileclose(os_file); > > > errnum := abs(SQLCODE);
    > > > errmsg := SQLERRM;
    > > > dbms_output.put_line(errnum&#0124; &#0124;'----'&#0124; &#0124;errmsg); > > > end;

    Can be one of two problems.
    One
    Your database user does not have
    privileges to open a socket inside
    the database. This will prevent
    the XML parser running inside the DB
    from retrieving the DTD which it must
    do to properly parse the document.
    Two
    you are sitting behind a corporate
    firewall and need to properly set
    the Proxy Server host and port to
    properly retrieve the DTD.
    From looking at your code it would appear
    that your job can more easily be done by
    using the OracleXML putXML command line
    utility outside the database.
    You can specify the -D options to your
    JavaVM to set the System properties for
    the proxy server if need be like this:
    java -DproxySet=true -DproxyHost=yourproxyserver OracleXML putXML

  • External DTDs in 1.1

    Can 1.1 on Win2000 Server handler DTD that are external to the xml document? I know it handles local DTDs.
    Here is the decl:
    <!DOCTYPE TRANSCRIPT SYSTEM "\\dga22\DTDs\transcript.dtd">
    Here is the error.
    Thu Mar 08 15:51:40 CST 2001: \Transcription\Inprocess\trans02022001T1.xml:
    oracle.ifs.common.IfsException: IFS-12608: Error while pre-parsing with the SAXParser: at line (2), column (59): Error opening external DTD '\\dga22\DTDs\transcript.dtd'.
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at oracle.ifs.common.IfsException.<init>(Compiled Code)
    at oracle.ifs.common.IfsException.<init>(Compiled Code)
    at oracle.ifs.beans.parsers.IfsXmlParser.preParse(Compiled Code)
    at oracle.ifs.beans.parsers.IfsXmlParser.getParserName(IfsXmlParser.java:367)
    at oracle.ifs.beans.parsers.IfsXmlParser.parse(IfsXmlParser.java:276)
    at oracle.ifs.beans.parsers.IfsXmlParser.parse(IfsXmlParser.java:214)
    at oracle.ifs.utils.common.ParserHelper.parseExistingDocument(ParserHelper.java:379)
    at oracle.ifs.protocols.ntfs.server.FileProxy.parseFile(FileProxy.java:785)
    at oracle.ifs.protocols.ntfs.server.FileProxy.cleanupFile(Compiled Code)
    at oracle.ifs.protocols.ntfs.server.FileProxy.run(Compiled Code)
    null

    I think the DTD has to be stored in the IFS repository or accessed with an HTTP protocol
    null

  • Using dbms_xmlsave

    I am trying to save contents of xml file into database tables. I know I have to use dbms_xmlsave.insertxml, but it does not allow you to work with multiple tables, so I created a view to join 2 tables together. But when I try to insert into the view I get this error:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: Exception
    'oracle.jdbc.driver.OracleSQLException:ORA-01732: data manipulation operation
    not legal on this view
    ' encountered during processing ROW element 1All prior XML row changes were
    rolled back. in the XML document.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 91
    ORA-06512: at line 31
    My xmldatagram looks like this:
    <?xml version = "1.0"?>
    <warranty_claim>
    <ROW>
    <customer_claim_no>12345</customer_claim_no>
    <claim_date>2003-SEP-24</claim_date>
    <repair_shop_site_name>test supplier</repair_shop_site_name>
    <failed_part_no>12345</failed_part_no>
    <other_part>
    <other_part_item>
    <customer_claim_no>12345</customer_claim_no>
    <part_no>54321</part_no>
    <unit_price>10.2</unit_price>
    <quantity>10</quantity>
    <total_price>102</total_price>
    </other_part_item>
    <other_part_item>
    <customer_claim_no>12345</customer_claim_no>
    <part_no>98767</part_no>
    <unit_price>20.2</unit_price>
    <quantity>10</quantity>
    <total_price>202</total_price>
    </other_part_item>
    </other_part>
    </ROW>
    </warranty_claim>
    create or replace type ph_other_part as object(
    customer_claim_no varchar2(100),
    part_id number,
    part_no varchar2(100),
    description varchar2(100),
    unit_price number,
    quantity number,
    total_price number,
    part_failed varchar2(100))
    create or replace type ph_othpart_tab as table of ph_other_part
    create or replace view ph_wc_view
    as select customer_claim_no,
    claim_date,
    repair_shop_site_name,
    failed_part_no,
    CAST(MULTISET(select customer_claim_no,
    part_id,
    part_no,
    description,
    unit_price,
    quantity,
    total_price,
    part_failed
    from ph_wc_part pwp
    where pwp.customer_claim_no = pwc.customer_claim_no
    ) AS sys.ph_othpart_tab ) other_part
    from ph_warranty_claim pwc
    main script
    declare
    insCtx dbms_xmlsave.ctxType;
    rowcount number:=0;
    v_tablename varchar2(100):='ph_wc_view';
    xmldoc clob;
    errorNum number;
    errorMsg varchar2(200);
    begin
    begin
    select data
    into xmldoc
    from cic.cic_temp
    where data_id = 2;
    exception when others then
    dbms_output.put_line('Error getting xmldoc. '||sqlerrm(sqlcode));
    end;
    insCtx := dbms_xmlsave.newcontext(v_tablename);
    dbms_xmlsave.setIgnoreCase(insCtx,1);
    dbms_xmlsave.clearupdatecolumnlist(insCtx);
    dbms_xmlsave.setupdatecolumn(insCtx,'customer_claim_no');
    dbms_xmlsave.setupdatecolumn(insCtx,'claim_date');
    dbms_xmlsave.setupdatecolumn(insCtx,'repair_shop_site_name');
    dbms_xmlsave.setupdatecolumn(insCtx,'failed_part_no');
    dbms_xmlsave.setupdatecolumn(insCtx,'other_part');
    rowcount := dbms_xmlsave.insertXML(insCtx,xmldoc);
    dbms_xmlsave.closecontext(insCtx);
    commit;
    dbms_output.put_line('Rows inserted: '||rowcount);
    end;

    Hi,
    For your XML file I think you just need to enclose XML elemnts in ROWSET AND ROW TAGS - so xml should look like :
    <ROWSET>
    <ROW>
    <DEPT>
    </DEPT>
    and just pass it as CLOB to dbms_xmlsave.insertXML proc.
    I hope it should work.
    I am also trying to insert XML file but with a bit complex structure having multiple nested elements.
    I am not sure how to transform the external XML file to wrap it in ROWSET/ROW using XSLT. It's mandatory to use ROWSET/ROW tags to be able to insert in oracle tables. I am facing this problem right now. I am using object views to accomplish the purpose but still needs to figure out the way to apply stylesheet to incoming XML file.
    If you come to know of any way, pls do let me know also.
    Thanks

  • DBMS_XMLSave.insertXML ORA-01024 error

    DBMS_XMLSave.insertXML ORA-01024 error
    The following error is being produced when trying to use DBMS_XMLSave.insertXML. The xml datagram was produced from the view using DBMS_XMLQuery.getXML. This works fine for non object nested views.
    Does anyone know of a problem with this approach or syntax.
    Thanks
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: 'oracle.jdbc.driver.OracleSQLException:
    ORA-01024: invalid datatype in OCI call
    ' encountered during processing ROW element 1. All prior XML row changes were
    rolled back. in the XML document.
    ORA-06512: at "SYSTEM.DBMS_XMLSAVE", line 91
    ORA-06512: at "SJS.IMRES", line 60
    ORA-06512: at "SJS.IMRES", line 99
    ORA-06512: at line 6
    *************** Insert Procedure *******************
    PROCEDURE InsertXml(xmlDoc IN clob, tableName IN VARCHAR2) IS
    insCtx DBMS_XMLSave.ctxType;
    rows number;
    BEGIN
    DBMS_OUTPUT.PUT_LINE('INsertXml - '||tableName);
    insCtx := DBMS_XMLSave.newContext(tableName);
    rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc);
    dbms_output.put_line('InsertXML -'||rows);
    DBMS_XMLSave.closeContext(insCtx);
    COMMIT;
    END InsertXml;
    *************** Object view *******************
    CREATE OR REPLACE TYPE sjs.imres_error_type AS OBJECT
    ("ResponseErrorCode"     VARCHAR2(10),
    "ResponseErrorDesc"     VARCHAR2(4000))
    CREATE OR REPLACE TYPE sjs.imres_errors_type AS TABLE OF imres_error_type
    CREATE OR REPLACE VIEW sjs.imresponse
    AS SELECT ith.a_id AS "ArrestNumber",
    CAST(MULTISET(SELECT ire.errorcode,
    ire.errordesc
    FROM sjs.imresponseerrors ire
    WHERE ire.ith_id = ith.ith_id) AS imres_errors_type) AS "Errors"
    FROM sjs.imtransactionhistory ith
    *************** XML DATAGRAM *******************
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW>
    <ArrestNumber>2</ArrestNumber>
    <Errors>
    <Errors_ITEM>
    <ResponseErrorCode>CODE 2</ResponseErrorCode>
    <ResponseErrorDesc>DESC 2</ResponseErrorDesc>
    </Errors_ITEM>
    <Errors_ITEM>
    <ResponseErrorCode>CODE 1</ResponseErrorCode>
    <ResponseErrorDesc>DESC 1</ResponseErrorDesc>
    </Errors_ITEM>
    </Errors>
    </ROW>
    </ROWSET>

    It seems to be related to an insert/update for the same context
    having different columns with "values" in it.
    I have 3 rows. For the AMT column the first row has 151.56,
    the second row has 100.00, the third row has .00
    The third row fails with this error :
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "MTRSTEST.KIM_RTL_XML_PKG", line 150
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException:
    Invalid context handle specified.
    ORA-06512: at "SYS.DBMS_XMLQUERY", line 170
    ORA-06512: at "MTRSTEST.KIM_RTL_XML_PKG", line 193
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException:
    Expected 'EOF'.
    ORA-06512: at "MTRSTEST.KIM_TEST", line 197
    ORA-06512: at line 1
    If I change the third row to say 10.00, for example, it works
    fine.
    We had not been on xdk9 yet, I'm having them install xdk9 and
    we'll see if the problem persists.

  • Can i trap "Error opening URL" error?

    Can i trap "Error opening URL" ?
    I am using someMC.loadMovie("someImg.jpg")
    This works fine I would however like to be able to use the
    error "Error opening URL" and switch to another file if the first
    dose not exist. Can i do this?

    use the moviecliploader class to catch that error.

Maybe you are looking for