Xmldom.writetoclob hanging forever when writing a domnode to a temp clob

Hi
Wondering has anyone come across anything similar (or know a work around)
1. Basically the the procedure below loads an XML file. (OK)
2. Removes reference to external dtd, ref was causing and error (OK)
3. Parses the XML (OK)
4. Gets a list of the "item" tags (OK) - should be up to 500 item elements in XML
5. Loops on all elements
a. writes node to temp clob *(PROBLEM HERE)*
b. Creates xmltype from clob (OK)
c. transforms xmltype and assigns to another xmltype (OK)
d. inserts new xmltype (OK)
This procedure is used by a threaded os java app to load thousands of files to db.
It works fine 99% of the time but for some files the procedure is hanging at (5.a : write domnode to clob using xmldom.writetoclob)
I am absolutely sure the problem is due to the characters in the domnode as all files that have hung on processing contain these bizarre characters,
the db character set is Unicode AL32UTF8 so it should be able to handle almost anything, saying that, if the it is a prob with the characters then why does
the loadclobfromfile procedure succeed.
Developed on Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
I have no prob rejecting node and continue processing but procedure just hangs and i have to kill the thread on the os.
Is there a way to
1. Test for invalid AL32UTF8 chars and skip on error.
or
2. Get around the xmldom.writetoclob procedure and create an xmltype from the xmldom.domnode (i tried to convert domnode -> domdocument -> xmltype, no joy)
or
Open to suggestions
PROCEDURE
PROCEDURE process_blog_xml_file (
      p_file_name     IN   VARCHAR2,
      p_insert_date   IN   VARCHAR2,
      p_dir           IN   VARCHAR2 DEFAULT NULL
   IS
      newsurl        VARCHAR2 (80);
      parser         xmlparser.parser;
      newsxml        xmldom.domdocument;
      titles         xmldom.domnodelist;
      titles_found   NUMBER;
      curnode        xmldom.domnode;
      textchild      xmldom.domnode;
      dest_clob      CLOB;
      l_temp_clob    CLOB;
      src_clob       BFILE         := BFILENAME (g_zip_file_dir, p_file_name);
      dst_offset     NUMBER             := 1;
      src_offset     NUMBER             := 1;
      lang_ctx       NUMBER             := DBMS_LOB.default_lang_ctx;
      warning        NUMBER;
      l_xml          XMLTYPE;
      xsldata        XMLTYPE;
      xmldata        XMLTYPE;
      l_dir          VARCHAR2 (1000);
   BEGIN
      LOG (   'Start Processing file '
           || p_file_name
           || ' from zip '
           || p_insert_date
      IF p_dir IS NULL
      THEN
         SELECT directory_path
           INTO l_dir
           FROM all_directories
          WHERE directory_name = g_zip_file_dir;
      ELSE
         l_dir := p_dir;
      END IF;
      IF g_xsl_clob IS NULL
      THEN
         init_xsl_clob;
      END IF;
      com_polecat_xmldb_utils.set_load_date
                                  (TO_DATE (REPLACE (REPLACE (p_insert_date,
                                                     '.zip',
                                            'DD-MM-YYYY'
      LOG ('ITEM.Loaddate set : ' || com_polecat_xmldb_utils.get_load_date);
      xsldata := XMLTYPE.createxml (g_xsl_clob);
      LOG ('Read xsl file to clob');
      DBMS_LOB.OPEN (src_clob, DBMS_LOB.lob_readonly);
      DBMS_LOB.createtemporary (dest_clob, TRUE);
      DBMS_LOB.loadclobfromfile (dest_lob          => dest_clob,
                                 src_bfile         => src_clob,
                                 amount            => DBMS_LOB.getlength
                                                                     (src_clob),
                                 dest_offset       => dst_offset,
                                 src_offset        => src_offset,
                                 bfile_csid        => NLS_CHARSET_ID
                                                                   ('AL32UTF8'),
                                 lang_context      => lang_ctx,
                                 warning           => warning
      LOG ('Read xml file to clob');
      DBMS_LOB.CLOSE (src_clob);
      parser := xmlparser.newparser;
      dest_clob := REPLACE (dest_clob, g_blog_dtd_remove, '');
      LOG ('Parse xml ');
      xmlparser.parseclob (parser, dest_clob);
      DBMS_LOB.freetemporary (dest_clob);
      newsxml := xmlparser.getdocument (parser);
      xmlparser.freeparser (parser);
      titles := xmldom.getelementsbytagname (newsxml, 'item');
      LOG ('Load  blogs items to ITEM table. ');
      FOR j IN 1 .. xmldom.getlength (titles)
      LOOP
         curnode := xmldom.item (titles, j - 1);
         DBMS_LOB.freetemporary (l_temp_clob);
         DBMS_LOB.createtemporary (l_temp_clob, TRUE);
         LOG ('write node to temp clob ' || j);
         xmldom.writetoclob (curnode, l_temp_clob);                                              <-- Hanging Here
         LOG ('create xml type from clob ' || j);
         l_xml := XMLTYPE.createxml (l_temp_clob);
         LOG ('apply xsl transform to xml ' || j);
         xmldata := l_xml.transform (xsldata);
         LOG ('Insert to item table  ' || j);
         BEGIN
            INSERT INTO item
                 VALUES (xmldata);
         EXCEPTION
            WHEN OTHERS
            THEN
               LOG ('Error::  ' || SQLERRM);
         END;
      END LOOP;
      xmldom.freedocument (newsxml);
      LOG (   'Finished Processing file '
           || p_file_name
           || ' from zip '
           || p_insert_date
   EXCEPTION
      WHEN OTHERS
      THEN
         LOG (SQLERRM);
   END;note variables starting with g_ are defined in package spec
Cheers
Ian
Edited by: user3604054 on 01-Apr-2010 06:52
Edited by: user3604054 on 01-Apr-2010 14:57
Edited by: user3604054 on 01-Apr-2010 15:00
Edited by: user3604054 on 01-Apr-2010 15:00
Edited by: user3604054 on 01-Apr-2010 15:05
Edited by: user3604054 on 01-Apr-2010 15:06

2. Get around the xmldom.writetoclob procedure and create an xmltype from the xmldom.domnode (i tried to convert domnode -> domdocument -> xmltype, no joy) Which version of Oracle (4 digits)?
Also look in the FAQ in the upper right for how to use the tag to wrap PL/SQL to retain formatting to make it easier for all to read.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Photoshop hangs up when writing text

    I have workstation
    Dell Precision T5400
    Base Intel Xeon E5420 (2.50GHZ, 1333Mhz, 2x6MB,Quad Core)
    Operating System Windows Vista® Business SP1 64Bit
    Memory 8GB DDR2 667 Quad Channel FBD Memory (4x2GB)
    Video Card 512MB PCIe x16 nVidia Quadro FX 1700 (MRGA14L)
    Hard Drive 146G,(15,000rpm) SAS Hard Drive
    2nd Hard Drive Additional - 146G,(15,000rpm) SAS 2 Hard Drive
    Raid Controller C15 SAS No RAID for 2 Hard Drive
    And when i try to write something in Photoshop cs4 64bit version it hangs up with following event entry:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: Photoshop.exe
    Application Version: 11.0.0.0
    Application Timestamp: 48d38aa7
    Fault Module Name: BIB.dll
    Fault Module Version: 1.2.1.1744
    Fault Module Timestamp: 48b5fcc0
    Exception Code: c0000005
    Exception Offset: 000000000001a303
    OS Version: 6.0.6001.2.1.0.256.6
    Locale ID: 1063
    Additional Information 1: 2818
    Additional Information 2: 5c2b16a25fedf03aa652cc3088922fb6
    Additional Information 3: 1f10
    Additional Information 4: ec8d43907313a023e731faa974f00a55
    32bit version of photoshop cs4 is working fine.
    What's happening? why i can't use 64bit version of ps?

    > Could you write what are those fonts exactly so i can delete them
    Were that it was so easy. Adobe makes over 1000 fonts. They know that those will not cause a problem. They can provide you with a list of those. There are another 900,000 fonts (I guess) in the world, and more being made every hour. Adobe does not track those, but knows that a small percent of them are defective, and can cause the problems Chris mentions.
    The trick is to find which font is bad. I only use the Adobe fonts, so I never have had a problem. The people who search out free fonts through the web are generally those that get the diseased fonts.
    The solution is to remove all fonts other than those from Adobe, Microsoft, and other reputable makers. Test if the problem goes away. If it does, then there is a bad font (or several) in the fonts you deleted. Add fonts back slowly, never more than a few dozen at a time, and test with PS after each addition. When it breaks, you know a bad font was in the last group of fonts added.
    This will take a bit of time, but hey, they are free fonts.

  • Dscc hangs  forever when do "New Entry"/Wizard

    We have DSEE 6.3 installed on windows2003, with dscc.war under Tomcat, and are having a problem where, when we do a "New Entry" (i.e., to add a new user), the new (empty/blank) window appears for the Wizard, and then nothing else happens.
    When we first start up Tomcat, it seems to work ok, but after navigating around (e.g., creating one or two users), we eventually get to the point when this problem happens.
    Killing the browser, and/or logging out of DSCC doesn't help. Once it's in this situation, the only thing that seems to get it working again is to bounce Tomcat. Then it works for awhile until it hangs again.
    I haven't seen it myself, but one of the other guys that I work with said that he's encountering a similar problem when trying to setup replication.
    Things that we have tried:
    - We've confirmed that the "enablePooling" is set to false in the Tomcat conf/web.xml
    - We've tried several versions of Tomcat, including 5.5.7 and 5.5.26
    - We originally saw this problem with DSEE 6.2.
    Has anyone encountered this problem?
    Thanks,

    Thanks for helping to reolve the issue .I did dsccsetup war-file-create --overwrite and redeployed in Tomcat.Now it works fine,I confirming after some tests by doing back and fro to the wizard screens.
    I dont know whats wrong to it on first time deployment.For previous deployment , Wizard screens of "New Entry Managment" the text field to select entry by browsing was always disabled and now it is enabled to modify the field also.For just to verify purposes here I am giving the tomcat logs for the previuos deployment .
    12:55:40 | http-808-Processor24 | com.sun.web.ui.model.CCDefaultEntityResolver:getSystemId | entity resolver systemid: file:///C:/Tomcat%205.5/descriptor.dtd
    12:55:42 | http-808-Processor24 | com.sun.web.admin.directory.dcc.solo.DCCSoloSessionManagerFilter:earlyTrace2 | Request: http-hostname-808: /dscc/wizard/WizardWindow12:55:42 | http-808-Processor24 | com.sun.web.admin.directory.dcc.solo.DCCSoloSessionManagerFilter:earlyTrace2 | Request Context Path: /dscc
    12:55:42 | http-808-Processor24 | com.sun.web.admin.directory.dcc.solo.DCCSoloSessionManagerFilter:earlyTrace2 | Request Servlet Path: */wizard*
    12:55:42 | http-808-Processor24 | com.sun.web.admin.directory.dcc.solo.DCCSoloSessionManagerFilter:earlyTrace2 | Request Path Info : /WizardWindow
    12:55:42 | http-808-Processor24 | com.sun.web.ui.common.CCSystem:getResourceContextPath | RCPATH : /dscc/com_sun_web_ui
    12:55:42 | http-808-Processor24 | com.sun.web.ui.model.CCDefaultEntityResolver:getSystemId | entity resolver systemid: file:///C:/Tomcat%205.5/com_sun_web_ui/dtd/propertysheet.dtd
    12:55:42 | http-808-Processor24 | com.sun.web.ui.model.CCDefaultEntityResolver:getSystemId | entity resolver systemid: file:///C:/Tomcat%205.5/descriptor.dtd
    12:55:42 | http-808-Processor24 | com.sun.web.ui.common.CCSystem:getResourceContextPath | RCPATH : /dscc/com_sun_web_ui
    12:55:42 | http-808-Processor24 | com.sun.web.ui.model.CCDefaultEntityResolver:getSystemId | entity resolver systemid: file:///C:/Tomcat%205.5/com_sun_web_ui/dtd/pagetitle.dtd
    12:55:42 | http-808-Processor24 | com.sun.web.ui.model.CCDefaultEntityResolver:getSystemId | entity resolver systemid: file:///C:/Tomcat%205.5/descriptor.dtd
    12:55:42 | http-808-Processor24 | com.sun.web.ui.taglib.pagetitle.CCPageTitleTag:appendPageTitleAlertAndText | Node has no attributes.
    12:55:42 | http-808-Processor24 | com.sun.web.ui.taglib.pagetitle.CCPageTitleTag:appendPageActions | Could not obtain pageactions element.**12:55:42 | http-808-Processor24 | com.sun.web.ui.taglib.pagetitle.CCPageTitleTag:appendPageViewsMenu | Could not obtain pageviews element.
    12:55:42 | http-808-Processor24 | com.sun.web.admin.directory.dcc.WizardServlet:onUncaughtException | uncaught exception java.lang.IllegalStateException: Cannot forward after response has been committed at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
         at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
         at com.sun.web.ui.view.wizard.CCWizard.handleFinishButtonRequest(CCWizard.java:798)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
         at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
         at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
    Edited by: siteminder on Nov 17, 2008 1:17 PM
    Edited by: siteminder on Nov 17, 2008 1:19 PM

  • When installing a FF software update the Downloading Firefox window just hangs forever when trying to connect to the update server. Why?

    I have Forefox 4.0 for Yahoo! UK and Ireland
    Operating system is Windows Vista and my current location is Japan
    No other technical problems experienced

    If you have problems with updating then best is to download the full version and uninstall the currently installed version.<br />
    You may need to remove the Firefox program folder to do a clean install of the new version.
    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Do not remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.

  • Xmldom.writeToClob error. [URGENT]

    Any idea why I get the following error when I call:
    xmldom.writeToClob(root, xml_out);
    ORA-20000: An internal error has occurred: CLOB to write to can not be null ORA-06512: at "XML.XMLDOM", line 37 ORA-06512: at "XML.XMLDOM", line 358 ORA-06512: at line 131
    'xml_out' is initialised with null, but 'root' have some nodes and elements, but no text nodes. I do not get this error if I use
    xmldom.writeToBuffer(root, v_xml);
    Thanks
    null

    Thx for your response
    the program looks like this:
    I executed it from a Form;
    PROCEDURE PRUEBA IS
    xml clob;
    vxml varchar2(100);
    len integer := 1;
    pos integer := 1;
    f utl_file.file_type;
    doc xmldom.DOMDocument;
    ppal_node xmldom.DOMNode;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.DOMNode;
    tercer_node xmldom.DOMNode;
    item_node xmldom.DOMNode;
    ppal_elmt xmldom.DOMElement;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.DOMText;
    --Elementos de la cabecera
    header_pi xmldom.DOMProcessingInstruction;
    header_node xmldom.DOMNode;
    CURSOR MODULOS IS
    SELECT T_COAPI AS COAPI,
    T_DNAPI AS DNAPI     
    FROM     T
    WHERE     T_COAPI = 'PES';
    BEGIN
    --Creamos un nuevo DOM document
    doc := xmldom.newDOMDocument();
    ppal_node := xmldom.makeNode(doc);
    FOR Modulo IN Modulos LOOP
    -- El nodo es cada modulo
    root_elmt := xmldom.createElement(doc, 'Modulo');
    root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
    --COAPI
    item_elmt := xmldom.createElement(doc, lit_COAPI);
    item_node := xmldom.appendChild(root_node, xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc, Modulo.COAPI);
    item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
    --DNAPI
    item_elmt := xmldom.createElement(doc, lit_DNAPI);
    item_node := xmldom.appendChild(root_node, xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc, Modulo.DNAPI);
    item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
    END LOOP
    f := utl_file.fopen('TEMP_DIR','PRUEBA.xml','w');
    --Obtenemos la longitud del xml lob
    len := dbms_lob.getlength(xml);
    DBMS_LOB.CreateTemporary(xml,TRUE);
    xmldom.writeToClob(doc,xml); -- HERE I GET THE ERROR
    dbms_xmldom.WriteToFile(f,xml);
    WHILE (pos < len) LOOP
    vxml := dbms_lob.substr(xml,100,pos);
    utl_file.put(f,vxml);
    pos := pos+100;
    END LOOP;
    utl_file.fclose(f);
    END;

  • Error While Writing DOM to a CLOB i.e. xmldom.writeToClob

    I am running into error while writng and reading from a clob. The Sample Code is as follows :
    declare
    p xmlparser.Parser;
    doc xmldom.DOMDocument;
    i_tmp CLOB;
    i_tmp1 CLOB;
    i_buffer varchar2(32767);
    i_amount pls_integer;
    begin
    p := xmlParser.NewParser;
    xmlparser.setbaseDir(p,'/sqlcom/inbound');
    xmlparser.setValidationMode(p, TRUE);
    xmlparser.showwarnings(p, TRUE);
    xmlparser.seterrorlog(p, '/sqlcom/inbound/veshaal.err');
    xmlparser.parse(p,'/sqlcom/inbound/mpoi.xml');
    doc := xmlparser.getDocument(p);
    dbms_lob.createtemporary(i_tmp1,true,dbms_lob.session);
    xmldom.writeToClob(doc,i_tmp1);
    xmldom.writeToFile(doc,'/sqlcom/inbound/veshaal_out.xml');
    dbms_lob.createtemporary(i_tmp,true,dbms_lob.session);
    xmldom.writeTobuffer(doc,i_buffer);
    dbms_lob.write(i_tmp,length(i_buffer),1,i_buffer);
    i_amount := dbms_lob.getLength(i_tmp);
    dbms_lob.read(i_tmp,i_amount,1,i_buffer);
    dbms_lob.freetemporary(i_tmp1);
    commit;
    exception
    when others then
    dbms_lob.freetemporary(i_tmp1);
    dbms_output.put_line(SQLERRM);
    end;
    The oracle Error is as follows:
    declare
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    ORA-24323: value not allowed
    Error accessing package DBMS_APPLICATION_INFO
    ERROR:
    ORA-03114: not connected to ORACLE
    The above code works while I try to write to a buffer or a file using xmldom.writeToFile or xmldom.writeToBuffer.
    The xmlparser v2 is running inside the 8i ( 8.1.5.0. ) database.
    The alert file has the following entry :
    Errors in file /home/applrt/db/superbwl/log/superbwl_ora_2371.trc:
    ORA-07445: exception encountered: core dump [EE1F05DC] [SIGSEGV] [Address not mapped to object] [0] [] []
    Any help will be appreciated.
    Thanks
    null

    UTL_FILE comes as part of the database, you shouldn't have to install it, and you most certainly shouldn't install it as SCOTT. System packages should be installed using a system user such as sys.
    Firstly, I would suggest dropping the UTL_FILE package from your scott schema and then logging on as sys and granting execute permission on UTL_FILE to the scott user.
    Secondly...
    The UTL_FILE_DIR parameter has been deprecated by oracle in favour of direcory objects because of it's security problems.
    The correct thing to do is to create a directory object e.g.:
    CREATE OR REPLACE DIRECTORY mydir AS 'c:\myfiles';Note: This does not create the directory on the file system. You have to do that yourself and ensure that oracle has permission to read/write to that file system directory.
    Then, grant permission to the users who require access e.g....
    GRANT READ,WRITE ON DIRECTORY mydir TO myuser;Then use that directory object inside your FOPEN statement e.g.
    fh := UTL_FILE.FOPEN('MYDIR', 'myfile.txt', 'r');Note: You MUST specify the directory object name in quotes and in UPPER case for this to work as it is a string that is referring to a database object name which will have been stored in uppercase by default.

  • Why does my iPad hang when writing an email?  When I'm done with the email, I can't send it out and have to re-boot the iPad.

    Why does my iPad hang when writing an email?  When I'm done with the email, I can't send it out and have to re-boot the iPad. This happens if the time to compose email exceeds 10 to 15 minutes.

    Shut down all programs that are running in the background.
    1. Double-click the Home button to see Apps in background
    2. Hold the Apps down for a second or two until you see the minus sign
    3. Tap the minus sign to close program
    4. Reset iPad. Hold the Sleep and Home button down for about 10 second until you see the Apple logo
    Suggest you perform Step 1 to 3 at the end of every day.

  • Using xmldom.writeToClob to update xml clob corrupts clob

    We are storing an xml document in a clob field in the db. As part of a data check we need to parse the xml and possibly remove a node. I can do that, and check the results using 'xmldom.writeToBuffer'.
    When I try to write the data back to the db using 'xmldom.writeToClob' I get strange results. Data seems to be appended to the end of the clob and contains chr(13) characters at the end of each line.
    Also does anyone know if the existence of whitespace in the xml clob would cause a parse/search to be slower?
    I am new to xml and might be missing something fairly basic in the following code. Thanks in advance for any help.
    Here is some of the code:
    doc xmldom.DOMDocument;
    curNode xmldom.DOMNode;
    parentNode xmldom.DOMNode;
    theNodeList xmldom.DOMNodeList;
    str varchar2(4000);
    begin
    -- open xml_rec cursor (xml is the clob field opened for update)
    -- Loop through all item elements
    theNodeList := xmldom.getElementsByTagName(doc, 'item');
    for m in 0..xmldom.getLength(theNodeList)-1 loop
    curNode := xmldom.item(theNodeList,m);
    --perform a check and possibly delete the current node
    parentNode := xmldom.getParentNode(curNode);
    parentNode := xmldom.removechild(parentNode, curNode);
    xmldom.writeToBuffer(doc, str);
    --I check the results here and everything looks good
    xmldom.writeToClob(doc, xml_rec.xml);
    --When I check the clob the data is incorrect.
    null

    The next cod is a sample of the implementation xmldom.writeToClob used xmldom.DOMNode in the parameter of input.
    DECLARE
    XMLOut CLOB := EMPTY_CLOB();
    XMLIn Varchar2(2000);
    XSLPath Varchar2(2000);
    BEGIN
    DBMS_LOB.CREATETEMPORARY(XMLOut,TRUE); -- Give permit
    DBMS_LOB.OPEN (XMLOut, DBMS_LOB.LOB_READWRITE); --open the file of read and write
    XSLPath := '/users/gcardona/plantillas/report.xsl';
    GE_BSXMLCONVERT.createElementName('COLUMN');
    GE_BSXMLCONVERT.createElementAttribute('name', 'OUTXML');
    GE_BSXMLCONVERT.addElement();
    GE_BSXMLCONVERT.createElementName('table');
    GE_BSXMLCONVERT.createElementAttribute('name', 'X1');
    GE_BSXMLCONVERT.createElementAttribute('width', '100');
    GE_BSXMLCONVERT.addElement();
    XMLIn := GE_BSXMLCONVERT.toXML();
    XSLTranform(XMLIn, XSLPath, XMLOut);--XMLOut is a variable in out in the procedure,
    --here is where is return the file XML Process
    insert into in_prueba (ID,XML_CLOB) values (200, XMLOut);
    DBMS_LOB.CLOSE (XMLOut); -- Close File
    DBMS_LOB.FREETEMPORARY(XMLOut); --free memory
    GE_BSXMLCONVERT.clearMemory();
    commit;
    END;
    null

  • To : Oracle Team.. xmldom.writetoclob is too slow

    HI;
    I had Oracle 8.1.6, Used the xmldom package a lot to manipulate and create xml documents ( all sizes ). then I used xmldom.writetoclob which it was giving a GREAT performance.
    I UPGRADED ti Oracle 8.1.7 and xmldom.writetoclob is TOO SLOW now, I have the same settings ( java_pool_size, share_pool, etc)
    What changed from 8.1.6 to 8.1.7 ??
    Why xmldom.writetoclob is so much slower in 8.1.7 ??
    when tranfering a 300 KB document with 8.1.6 it used to take 30 seconds, no with 8.1.7 IT TAKES 2-1/2 minutes ?????
    WHY ? ? ? ? ?
    Tahnks for any information..

    My guess is that you are creating a clob with cached set to false
    e.g
    dbms_lob.createtemporary(v_myclob,false);
    When set to false any time the clob is written to the characters are written to the disk. causing it to be slow.
    try
    dbms_lob.createtemporary(v_myclob,true);
    I had the same problem. This speeds it up significantly
    Rick Laird

  • Xmldom.writetoclob give wrong character set

    I use xmldom to create a xml clob. I create document for xml as follow:
    doc := xmldom.NewDomDocument;
    xmldom.setVersion(doc, '1.0');
    xmldom.setStandalone(doc, 'no');
    xmldom.setCharSet(doc, 'ISO-8859-1'); -- Should be character set for danish.
    Create xml clob as follow:
    xmldom.writeToClob(root, out_xml);
    Problem: Now is danish 'x, f, e' replace with ??.
    When a use 'xmldom.WriteToFile(root, 'd:\test_document');' I get correctly danish 'x, f, e'!
    I have seen you can use procedure/function 'SetEncoding', but I can not find this function in my Oracle installation (8.1.7.1.1).

    The character set you specify via setCharset() procedure is ignored unless you use writeToFile() later.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_xmldom.htm#CHDCGDDB
    Usage Notes
    This is used for WRITETOFILE Procedures if not explicitly specified at that time.You can also use something like this :
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2 
      3   export_file  clob;
      4   prolog       clob := '<?xml version="1.0" encoding="UTF-8"?>';
      5 
      6  begin
      7 
      8    select prolog || chr(10) ||
      9           xmlserialize(document
    10             xmlelement("TextTranslation"
    11             , xmlattributes(
    12                 '1.0' as "version"
    13               , 'ja'  as "language"
    14               , 'DEMOAND' as "module"
    15               , 'VC' as "type"
    16               )
    17             )
    18             indent
    19           )
    20    into export_file
    21    from dual ;
    22 
    23    dbms_output.put_line ( export_file );
    24 
    25  end;
    26  /
    <?xml version="1.0" encoding="UTF-8"?>
    <TextTranslation version="1.0" language="ja" module="DEMOAND" type="VC"/>
    PL/SQL procedure successfully completed

  • Steve, why is xmldom.writetoclob so slow ??

    I am using xmldom.writetoclob, which is OK when transfering small ( < 1MG ) documents to a CLOB, but as the documetns get bigger it is very slow..
    It takes 15 minutes to transfer a 5MB document to a clob using xmldom.writetoclob.
    Anything I should be doing to see better results ?
    Thanks.
    I am using the PL/SQL parser

    what is your java_pool_size?

  • SAPGUI hangs forever

    Hi,
    i installed SAP Netweaver 4.7 on windows XP, on my laptop. SAPMMC shows all processes are running file. i am having SAPGUI 6.2. when i am trying to connect using SAPGUI, it hangs forever.
    My properties are as follows
    Application server: localhost (i tried with 127.0.0.1, i/p address, fully qualified domain name, but no success)
    Sap System : R/3
    System Number :01 (when i gave 00, i gave error message saying partner not reached .. connection refused).
    please let me know the solution.

    Hi Mohammed,
    I am not able to understand how 4.6 is installed on XP.
    the solution for your problem try to run at command prompt <b>sapgui <IP>/<hostname> 01</b>
    If still problem open c:\windows\system32\drivers\etc\services in notepad and add the following.
    <b>sapms<SID> 3601/TCP</b>
    where SID is the SAP System ID that had given.
    regards
    Anand.M

  • ITunes 10 slow when writing to disk

    Hi Folks,
    I'm running a pretty stout machine (by iTunes standards) and am having serious user experience issues. Whenever I try to play a new song, change the rating, checkmark, etc. and iTunes has to write to the disk (I assume to the library file) the UI hangs for 30 - 90 seconds. Playback of the song (if it was already playing) is not affected; however, I cannot click anywhere within iTunes and it becomes completely unresponsive. It does queue up the clicks though... so if I clicked 5 stars then pause it would take 30-90 seconds to execute the first command and then would pause.
    I am running 64-bit iTunes 10.3.1 on Windows 7 64-bit.
    My computer is an AMD Athlon X4 630 (2.8GHz quad-core) with 4GB RAM.
    iTunes library files are on a 500GB WD Blue drive (7200 RPM) and media is on a 1TB WD Green drive (5400 RPM).

    I'm having the same issue. iTunes was on a 2nd internal hard drive in my machine. I had about 500Gb of movies fine no problem. Started putting stuff onto a NAS then the slowness began.
    The transferred the NAS content to a new 3rd internal drive. Still slow as ****. (just as you describe). When writing to disc there's a pause (e,g when backing up iPad iTunes becomes unresponsive during every transfer of an app)
    Any suggestions?

  • ERROR WITH XMLDOM.WRITETOCLOB

    Hi,
    I have written the following procedure...............
    procedure Prc_UpdateNodes(clString in out clob, nodename varchar2, nodeValue varchar2) is
         l_doc_node xmldom.DOMNode;
         l_xml_out varchar2(2000);
         begin
                   domDocument      := Fn_GetXmlDocument(clString);
                   nodeList           := xmldom.getElementsByTagName(domDocument, nodename);
                   intNoOfNode      := xmldom.getLength(nodeList);
                   l_doc_node := xmldom.item(nodeList, 0);
                   for loopCount_int in 0.. intNoOfNode - 1 loop
         node := XmlDom.item(nodeList, loopCount_int);
                        valueNode := XmlDom.getFirstChild(node);
                        XmlDom.setNodeValue(valueNode,nodeValue);
                   end loop;
                   XmlDom.writeToClob(domDocument,clString);
    end;
    This below XML Is passed as the first parameter
    The output after this operation for an xml should be..
    <ROWSET>
    <ROW>
    <SITE_NO Key="Yes">1</SITE_NO>
    <PARAMETER_VALUE_NO Key="Yes">0</PARAMETER_VALUE_NO>
    <PARENT_PARAMETER_SPEC_NO>0</PARENT_PARAMETER_SPEC_NO>
    <PARAMETER_SPEC_NO>1</PARAMETER_SPEC_NO>
    <REF_TABLE_KEY_NO>0</REF_TABLE_KEY_NO>
    <REF_TABLE_KEY_TYPE>S</REF_TABLE_KEY_TYPE>
    <SEQ_NO>1</SEQ_NO>
    <SUB_SEQN_NO>0</SUB_SEQN_NO>
    <DATA_TYPE_NO>1</DATA_TYPE_NO>
    <INTEGER_VALUE>0</INTEGER_VALUE>
    <STRING_VALUE>00039</STRING_VALUE>
    <NUMERIC_VALUE>0</NUMERIC_VALUE>
    <DATE_VALUE>01/01/1600</DATE_VALUE>
    <CREATED_ON>0</CREATED_ON>
    <MODIFIED_ON>0</MODIFIED_ON></ROW>
    <ROW>
    <SITE_NO Key="Yes">1</SITE_NO>
    <PARAMETER_VALUE_NO Key="Yes">0</PARAMETER_VALUE_NO>
    <PARENT_PARAMETER_SPEC_NO>0</PARENT_PARAMETER_SPEC_NO>
    <PARAMETER_SPEC_NO>2</PARAMETER_SPEC_NO>
    <REF_TABLE_KEY_NO>0</REF_TABLE_KEY_NO>
    <REF_TABLE_KEY_TYPE>S</REF_TABLE_KEY_TYPE>
    <SEQ_NO>2</SEQ_NO><SUB_SEQN_NO>0</SUB_SEQN_NO>
    <DATA_TYPE_NO>2</DATA_TYPE_NO>
    <INTEGER_VALUE>0</INTEGER_VALUE>
    <STRING_VALUE/>
    <NUMERIC_VALUE>0</NUMERIC_VALUE>
    <DATE_VALUE/>
    <CREATED_ON>0</CREATED_ON>
    <MODIFIED_ON>0</MODIFIED_ON>
    </ROW>
    </ROWSET>
    But the output I get is ……….
    <ROWSET>
    <ROW>
    <SITE_NO Key="Yes">1</SITE_NO>
    <PARAMETER_VALUE_NO Key="Yes">0</PARAMETER_VALUE_NO>
    <PARENT_PARAMETER_SPEC_NO>0</PARENT_PARAMETER_SPEC_NO>
    <PARAMETER_SPEC_NO>1</PARAMETER_SPEC_NO>
    <REF_TABLE_KEY_NO>0</REF_TABLE_KEY_NO>
    <REF_TABLE_KEY_TYPE>S</REF_TABLE_KEY_TYPE>
    <SEQ_NO>1</SEQ_NO>
    <SUB_SEQN_NO>0</SUB_SEQN_NO>
    <DATA_TYPE_NO>1</DATA_TYPE_NO>
    <INTEGER_VALUE>0</INTEGER_VALUE>
    <STRING_VALUE>00039</STRING_VALUE>
    <NUMERIC_VALUE>0</NUMERIC_VALUE>
    <DATE_VALUE>01/01/1600</DATE_VALUE>
    <CREATED_ON>0</CREATED_ON>
    <MODIFIED_ON>0</MODIFIED_ON></ROW>
    <ROW>
    <SITE_NO Key="Yes">1</SITE_NO>
    <PARAMETER_VALUE_NO Key="Yes">0</PARAMETER_VALUE_NO>
    <PARENT_PARAMETER_SPEC_NO>0</PARENT_PARAMETER_SPEC_NO>
    <PARAMETER_SPEC_NO>2</PARAMETER_SPEC_NO>
    <REF_TABLE_KEY_NO>0</REF_TABLE_KEY_NO>
    <REF_TABLE_KEY_TYPE>S</REF_TABLE_KEY_TYPE>
    <SEQ_NO>2</SEQ_NO><SUB_SEQN_NO>0</SUB_SEQN_NO>
    <DATA_TYPE_NO>2</DATA_TYPE_NO>
    <INTEGER_VALUE>0</INTEGER_VALUE>
    <STRING_VALUE/>
    <NUMERIC_VALUE>0</NUMERIC_VALUE>
    <DATE_VALUE/>
    <CREATED_ON>0</CREATED_ON>
    <MODIFIED_ON>0</MODIFIED_ON>
    </ROW>
    </ROWSET>
    0</MODIFIED_ON>
    </ROW>
    </ROWSET>
    The letter in bold above are the newly introduced junk letters
    I think this problem is due to the buffer isssues………….
    Do we have any solution for clearing the buffer….
    Also this error doesnt occur all the time.........
    Sometimes it comes, Sometimes it works fine
    The error is introduced during execution of the statement
    XmlDom.writeToClob(domDocument,clString);
    Can anyone help me on this front?????
    Thanks
    Message was edited by:
    user609257

    Thx for your response
    the program looks like this:
    I executed it from a Form;
    PROCEDURE PRUEBA IS
    xml clob;
    vxml varchar2(100);
    len integer := 1;
    pos integer := 1;
    f utl_file.file_type;
    doc xmldom.DOMDocument;
    ppal_node xmldom.DOMNode;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.DOMNode;
    tercer_node xmldom.DOMNode;
    item_node xmldom.DOMNode;
    ppal_elmt xmldom.DOMElement;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.DOMText;
    --Elementos de la cabecera
    header_pi xmldom.DOMProcessingInstruction;
    header_node xmldom.DOMNode;
    CURSOR MODULOS IS
    SELECT T_COAPI AS COAPI,
    T_DNAPI AS DNAPI     
    FROM     T
    WHERE     T_COAPI = 'PES';
    BEGIN
    --Creamos un nuevo DOM document
    doc := xmldom.newDOMDocument();
    ppal_node := xmldom.makeNode(doc);
    FOR Modulo IN Modulos LOOP
    -- El nodo es cada modulo
    root_elmt := xmldom.createElement(doc, 'Modulo');
    root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
    --COAPI
    item_elmt := xmldom.createElement(doc, lit_COAPI);
    item_node := xmldom.appendChild(root_node, xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc, Modulo.COAPI);
    item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
    --DNAPI
    item_elmt := xmldom.createElement(doc, lit_DNAPI);
    item_node := xmldom.appendChild(root_node, xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc, Modulo.DNAPI);
    item_node := xmldom.appendChild(item_node, xmldom.makeNode(item_text));
    END LOOP
    f := utl_file.fopen('TEMP_DIR','PRUEBA.xml','w');
    --Obtenemos la longitud del xml lob
    len := dbms_lob.getlength(xml);
    DBMS_LOB.CreateTemporary(xml,TRUE);
    xmldom.writeToClob(doc,xml); -- HERE I GET THE ERROR
    dbms_xmldom.WriteToFile(f,xml);
    WHILE (pos < len) LOOP
    vxml := dbms_lob.substr(xml,100,pos);
    utl_file.put(f,vxml);
    pos := pos+100;
    END LOOP;
    utl_file.fclose(f);
    END;

  • Adobe reader hangs forever on save

    I downloaded following form:
    http://incometaxindiaefiling.gov.in/portal/downloads/itr/ITR2_Version1.0.pdf
    After filling it or say even after filling one entry if I try to save the form (ctrl-s), Adobe Reader seems to hang forever.
    Initially it shows lots of harddisk activity for 4-5 mins and after that harddisk activity stops but it keeps on using CPU to almost 100%. And then (after waiting for 10mins) I killed it.
    The file was not modified at all even after 10mins.
    I use Adobe Reader 7.0.8 (tar.gz) for Linux on FC6. Can someone confirm if same happens with 7.0.9 as I am not allowed to download/install it.
    Do I have to apply any patch? Any idea when Adobe Reader 8.1 for Linux be launched?
    Thanks in advance.
    Amish.

    Ctrl-S saves directly on same file which was opened hence obviously it wont show 'Save As' dialogue box. But it doesnt suspend for sure as otherwise it wont show lots of harddisk activity.
    I even tried File-Exit or Ctrl-Q. I even tried File-Close (Ctrl-W). In both cases it asked me to Save file or not. I clicked Yes and again after lots of harddisk activity nothing happened. Harddisk activity stopped after sometime but CPU was still used continuously. Reader simply hanged with gray window.
    Just now I tried same form on one FC2 machine and there too same problem occured. Waited for about 10mins.
    Were you able to save with same form?
    Thanks for your quick response.
    Amish.

Maybe you are looking for

  • Video through HDMI, audio through headphones

    Because of the way my sound system/TV is set up, I can't stream sound from the TV to the sound system; the sound system is picky about its input. I'd like to be able to use the HDMI to connect the video from my iPhone to the TV, but use the standard

  • HP DesignJet 450c

    I have a DesignJet 430 upgraded to a 450c which is not printing correctly. I am working on Windows XP.   All of the colours will not print correctly.  All of the cartridges are full.  The colour red will not print at all.  Can you advise on any measu

  • IPhone 4s syncs photo album names, no photos

    I have the new iPhone 4S and am having trouble syncing the calendar (Outlook) and photos (the album names appear, but no photos or video) from my Windows XP computer.

  • How to get the details of Calc. Formula

    Hi, Please let me know where can I check the detailed formula which is defined for subtotals(ex. Net value, list price etc.) in the pricing procedure that means how get the details of Calculation Formula which is maintained for price condition in the

  • Does Windows 7 64-bit "officially" support CS4 64-bit?

    Just saw a post here that says, "...be aware that PS is not supported on Windows 7. Some people have got it going though," as well as other posts about CS4 doing odd things in Win7. Just got a new i7-950/9GB/GTX-285 machine and Windows 7 64-bit Home