Error while saving xml document in table

I am using dbms_xmlsave.insert to
insert records in the table.
The procedure works fine when the xml file size is less then 1 Mb.
But when the file size is around 4 MB
I get the error java.lang.outofMemoryError.
Is there any limitation of number of records that can be saved or is there any parameter or any file required to be tuned.
null

Try increase JAVA_POOL size or set BATCH_SIZE
to be small.

Similar Messages

  • Heap space error while creating XML document from Resultset

    I am getting Heap space error while creating XML document from Resultset.
    It was working fine from small result set object but when the size of resultset was more than 25,000, heap space error
    I am already using -Xms32m -Xmx1024m
    Is there a way to directly write to xml file from resultset instead of creating the whole document first and then writing it to file? Code examples please?
    here is my code:
    stmt = conn.prepareStatement(sql);
    result = stmt.executeQuery();
    result.setFetchSize(999);
    Document doc = JDBCUtil.toDocument(result, Application.BANK_ID, interfaceType, Application.VERSION);
    JDBCUtil.write(doc, fileName);
    public static Document toDocument(ResultSet rs, String bankId, String interfaceFileType, String version)
        throws ParserConfigurationException, SQLException {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.newDocument();
            Element results = doc.createElement("sims");
            results.setAttribute("bank", bankId);
            results.setAttribute("record_type", "HEADER");
            results.setAttribute("file_type", interfaceFileType);
            results.setAttribute("version", version);
            doc.appendChild(results);
            ResultSetMetaData rsmd = rs.getMetaData();
            int colCount = rsmd.getColumnCount();
            String columnName="";
            Object value;
            while (rs.next()) {
                Element row = doc.createElement("rec");
                results.appendChild(row);
                for (int i = 1; i <= colCount; i++) {
                    columnName = rsmd.getColumnLabel(i);
                    value = rs.getObject(i);
                    Element node = doc.createElement(columnName);
                    if(value != null)
                        node.appendChild(doc.createTextNode(value.toString()));
                    else
                        node.appendChild(doc.createTextNode(""));
                    row.appendChild(node);
            return doc;
    public static void write(Document document, String filename) {
            //long start = System.currentTimeMillis();
            // lets write to a file
            OutputFormat format = new OutputFormat(document); // Serialize DOM
            format.setIndent(2);
            format.setLineSeparator(System.getProperty("line.separator"));
            format.setLineWidth(80);
            try {
                FileWriter writer = new FileWriter(filename);
                BufferedWriter buf = new BufferedWriter(writer);
                XMLSerializer FileSerial = new XMLSerializer(writer, format);
                FileSerial.asDOMSerializer(); // As a DOM Serializer
                FileSerial.serialize(document);
                writer.close();
            } catch (IOException ioe) {
                ioe.printStackTrace();
            //long end = System.currentTimeMillis();
            //System.err.println("W3C File write time :" + (end - start) + "  " + filename);
        }

    you can increase your heap size..... try setting this as your environment variable.....
    variable: JAVA_OPTS
    value: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

  • Error while getting xml document  with default connection in 8iJServer

    I had used GZIP utility to zip and store the document in
    the CLOB. If i use thin drivers and GZIP to retieve this document it works fine.
    instead of thin drivers if i use oracle8iJserver defalut
    connection i get the follwing error
    :Error while getting xml document Not in GZIP format.
    your response is appreciated.
    thanks
    sanjay.

    Hi Yepin Jin,
    I am facing the same issue did you solved it?
    Regards,
    Orlando Covault

  • Error while saving the documents in Transactions MIRO,VA02, VA01, ects

    Hi SAP Gurus,
    i am geting an popup error while saving or after changing the documents in MIRO VA01, VA02 transactions..
    The error is  * " Condition Table Missing : Access JST1 60 ( Pricing Taxes ) " *
    can u please help me out.
    Regards
    Kumar m

    Hi,
    Found a note explaining the significance of these errors.
    It says:
    "NZE-28862: SSL connection failed
    Cause: This error occurred because the peer closed the connection.
    Action: Enable Oracle Net tracing on both sides and examine the trace output. Contact Oracle Customer support with the trace output."
    For further details you may refer the Note: 244527.1 - Explanation of "SSL call to NZ function nzos_Handshake failed" error codes
    Thanks & Regards,
    Sindhiya V.

  • Error while building xml document

    Hi Everyone,
    I have a problem while building xml document.
    I have developed my java files using IBM Eclipse 3.0 and i had no problem while executing the files.
    But while i am trying to execute the same code in jdk/bin, xml document is not working..
    No error encountered while compiling but while executing when i try to print the xml string it just gives the root element name like [root : null]
    Can anyone suggest some solution?

    To the values element add xmlns:xsi and xsi:noNamespaceSchemaLocation.
    <values xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:noNamespaceSchemaLocation="file:///c:/schema.xsd">schema.xsd is schema file.

  • Error while saving shipment document

    Dear Gurus,
    While saving Shipment document i am getting this error
    Transportation planning point not allowed for export shipment.
    Please note i am not doing export shipment.
    Thanks
    KS

    I have checked all the settings and have found OK.
    I am getting the above error even while making empty shipments, without deliveries.
    I have used the same shipment type & transportation planning point earlier. I did not get these error at that time. I was able to create shipment cost document and other documents.
    Please advise.
    Thanks
    KS

  • Very urgent help needed- Error while passing XML document to Oracle stored

    Hi !
    I have been struggling a lot to call Oracle 9i stored procedure passing Stringbuilder object type from ASP.NET
    I am using Visual Studio 2008 Professional, OS: Windows XP and Oracle: 9.2.0.1.0
    Following is the procedure:
    CREATE or REPLACE PROCEDURE loadCompanyInfo (clobxml IN clob) IS
    -- Declare a CLOB variable
    ciXML clob;
    BEGIN
    -- Store the Purchase Order XML in the CLOB variable
    ciXML := clobxml;
    -- Insert the Purchase Order XML into an XMLType column
    INSERT INTO companyinfotbl (companyinfo) VALUES (XMLTYPE(ciXML));
    commit;
    --Handle the exceptions
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20101, 'Exception occurred in loadCompanyInfo procedure :'||SQLERRM);
    END loadCompanyInfo ;
    And following is the ASP.net code:
    StringBuilder b = new StringBuilder();
    b.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
    b.Append("<item>");
    b.Append("<price>500</price>");
    b.Append("<description>some item</description>");
    b.Append("<quantity>5</quantity>");
    b.Append("</item>");
    //Here you'll have the Xml as a string
    string myXmlString1 = b.ToString();
    //string result;
    using (OracleConnection objConn = new OracleConnection("Data Source=testdb; User ID=testuser; Password=pwd1"))
    OracleCommand objCmd = new OracleCommand();
    objCmd.Connection = objConn;
    objCmd.CommandText = "loadCompanyInfo";
    objCmd.CommandType = CommandType.StoredProcedure;
    //OracleParameter pmyXmlString1 = new OracleParameter("pmyXmlString1", new OracleString(myXmlString1));
    objCmd.Parameters.Add("myXmlString1", OracleType.clob);
    objCmd.Parameters.Add(myXmlString1).Direction = ParameterDirection.Input;
    //objCmd.Parameters.Add("result", OracleType.VarChar).Direction = ParameterDirection.Output;
    try
    objConn.Open();
    objCmd.ExecuteNonQuery();
    catch (Exception ex)
    Label1.Text = "Exception: {0}" + ex.ToString();
    objConn.Close();
    When I am trying to execute it, I am getting the following error:
    Exception: {0}System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'LOADCOMPANYINFO' ORA-06550: line 1, column 7: PL/SQL: Statement ignored at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery() at Default.Button1Click(Object sender, EventArgs e)
    I understand from this that the .net type is not the correct one, but I am not sure how to correct it. I could not find any proper example in any documentation that I came across. Most of the examples give information on how to read but not how to insert XML into Oracle table by calling Stored Procedure.
    Can you please help me to solve this problem? I hope that you can help solve this.
    Also, can you please give me an example of passing XML document XMLdocument to Oracle Stored procedure.
    In both the cases, if you can provide the working code then it would be of great help.
    Thanks,

    Hi ,
    Additional to the Above error details my BPEL code looks like this:
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <partnerLinks>
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>
    Kindly help if anyone has faced this Issue before.
    Regards,
    Rakshitha

  • Error while saving xml file using PDFDocument API

    Hi,
    I am trying to save xml file using byte array obtained from interactive form element in webdynpro java.
    The file gets saved but I get fllowing error message when I open the file.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'http://uxjciesk.wdf.sap.corp:50000/irj/go/km/doc...
    The code I am trying to achieve the functionality is:
    byte[] byteArray  = wdContext.currentContextElement().getPdfSource();
    IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
    IWDPDFDocumentAccessibleContext documentAccessibleContext = pdfDocumentHandler.getDocumentAccessibleContext();
    documentAccessibleContext.setPDF(byteArray);
    IWDPDFDocument pdfDocument = documentAccessibleContext.execute();
    ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getPDFAsStream();
    further, the datainputstream is used to store the file. I am able to save same xdp template in pdf file format successfully, the error only occurs for xml file storage.
    Please, advise.
    Regards,
    Urvashi

    Hi Urvashi,
        Try this code
              String contentStr = getXMLData(wdContext.currentContextElement().getPdfSource().read(false));
              String data = "";
              ByteArrayOutputStream pdfSourceOutputStream = new ByteArrayOutputStream();
              try {
                   InputStream pdfSourceInputStream = wdContext.currentContextElement().getData().read(false);
                   BufferedInputStream bufferedInputStream = new BufferedInputStream(wdContext.currentContextElement().getData().read(false));
                   int aByte;
                   while ((aByte = bufferedInputStream.read()) != -1) {
                        pdfSourceOutputStream.write(aByte);
                   pdfSourceOutputStream.flush();
                   pdfSourceOutputStream.close();
                   IWDPDFDocument pdfDocument = null;
                   try {
                        // Create an instance for PDFDocumnetHandler
                        IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
                        //Create an Inatance for PDFDocumentAccessibleContext
                        IWDPDFDocumentAccessibleContext documentAccessibleContext =     pdfDocumentHandler.getDocumentAccessibleContext();
                        //set the pdf data as OutputStream to the PDFDocumentAccessibleContext instance
                        documentAccessibleContext.setPDF(pdfSourceOutputStream);
                        //call the server to get the data                      
                        pdfDocument = documentAccessibleContext.execute();
                        //get the xml data in a InputStream
                        ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getData();
                   } catch (Exception e) {
                        data = "Null";
              } catch (IOException e) {
    Regards,
    Mathan

  • Error while parsing xml document that file name is Japanese.

    who can help me.
    when my xml file name is Japanese. Error occurs while parsing.
    the error message is "ORA-20100: Error occurred while parsing: No such file or directory"
    thanks.

    Hi,
    When I am trying to parse the XML file, I am getting
    the following error. When I run it on Windows having
    JDK1.4 it is working fine. But when I am running it
    on UNIX having JDK1.2, I am getting this ERROR.
    org.xml.sax.SAXParseException: Illegal character at
    end of document, <.
    Any help is appreiciated.I am just guessing, but I would imagine that some of the classes of your JDK 1.4 API have code that is not backwards compatible with earlier versions. There were a few significant changes to the language when 1.4 was released. You would have to read the release notes of 1.4 and also check the API documentation for the classes you are using to parse the XML.
    Also, there are some subtle differences between the OS versions of the Java compiler. You are using two different versions of the Java language and two different versions of operating system code.

  • Error while inserting XMLType document into table

    Dear sir,
    I have created a table in oracle 9i.The description is as follows:
    Name Null? Type
    ID NUMBER
    XML_DOCUMENT SYS.XMLTYPE(XMLSchema "http:
    //localhost:8080/home/SCOTT/
    xsd/message.xsd" Element "me
    ssage") STORAGE Object-relat
    ional TYPE "MESSAGE_TYPE"
    Later I tried to insert values into this table using the following statement:
    1 insert into test1(ID,XML_DOCUMENT)
    2 VALUES
    3 (100,
    4 xmltype
    5 (
    6 bfilename('xmldir','message1.xml'),
    7 nls_charset_id('AL32UTF8')
    8 )
    9* )
    I get the following error:
    ERROR at line 4:
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'.
    I have no idea of what to do now.Can someone please tell me how to proceed.
    Reference:(this is for the insert command statement)
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb04cre.htm#BABDCAFB
    Thanking you in advance,
    Sincerely,
    Sirisha.

    Yes, but bear in mind that Text searching is not truely XML aware...
    Also, a single 65M document is probably not a single docuemnt, it's probably a collection of smaller documents that have been colllected together into a single document. It may make more sense to split this into it's seperate components before loading it into the database...
    The typcical signature of document of this nature is
    <ROOT>
    <ELEMENT>
    </ELEMENT>
    <ELEMENT>
    </ELEMENT>
    <ELEMENT>
    </ELEMENT>
    </ROOT>

  • Error while saving a document in BO 4.1

    Hi Experts
    I created a new report and publish it to one of our folders in BI 4.1 CMS.
    I got below error
    Any idea ?

    Refer to SAP Note: 1970288 - Error Could not save the document to the repository for the following reason:[repo_proxy 58] when saving a report to the repository from the webi rich client
    Thanks,
    Prithvi

  • Error while inserting xml data into table

    Hello
    I am running thid stored procedure and this compiles correctly , but when I try to execute it gives me a error, I have been trying this form the past 3 days , could anyone please help me ASAP
    SQL> CREATE OR REPLACE PROCEDURE loadxml12 AS
    2 fil BFILE;
    3 buffer RAW(32767);
    4 len INTEGER;
    5 insrow INTEGER;
    6 BEGIN
    7 SELECT f_lob INTO fil FROM xml_temp12 WHERE key = 1;
    8 DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    9 len := DBMS_LOB.GETLENGTH(fil);
    10 DBMS_LOB.READ(fil,len,1,buffer);
    11 xmlgen.resetOptions;
    12 insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    13 DBMS_OUTPUT.PUT_LINE(insrow);
    14 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    15 DBMS_LOB.FILECLOSE(fil);
    16 END IF;
    17 EXCEPTION
    18 WHEN OTHERS THEN
    19 DBMS_OUTPUT.PUT_LINE('In Exception');
    20 DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    21 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    22 DBMS_LOB.FILECLOSE(fil);
    23 END IF;
    24 end;
    25 /
    Procedure created.
    SQL> exec loadxml12
    In Exception
    BEGIN loadxml12; END;
    ERROR at line 1:
    ORA-20000: ORU-10028: line length overflow, limit of 255 bytes per line
    ORA-06512: at "SYS.DBMS_OUTPUT", line 99
    ORA-06512: at "SYS.DBMS_OUTPUT", line 65
    ORA-06512: at "CARCLUB_RW2.LOADXML12", line 20
    ORA-06512: at line 1
    null

    Could you explain what your procedure does, please. I also tried to compile it but always got error message:
    PL/SQL: SQL Statement ignored
    PLS-00385: type mismatch found at 'FIL' in SELECT...INTO
    statement
    SQL> CREATE OR REPLACE PROCEDURE loadxml12 AS
    2 fil BFILE;
    3 buffer RAW(32767);
    4 len INTEGER;
    5 insrow INTEGER;
    6 BEGIN
    7 SELECT f_lob INTO fil FROM xml_temp12 WHERE key = 1;
    8 DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    9 len := DBMS_LOB.GETLENGTH(fil);
    10 DBMS_LOB.READ(fil,len,1,buffer);
    11 xmlgen.resetOptions;
    12 insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    13 DBMS_OUTPUT.PUT_LINE(insrow);
    14 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    15 DBMS_LOB.FILECLOSE(fil);
    16 END IF;
    17 EXCEPTION
    18 WHEN OTHERS THEN
    19 DBMS_OUTPUT.PUT_LINE('In Exception');
    20 DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    21 IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    22 DBMS_LOB.FILECLOSE(fil);
    23 END IF;
    24 end;
    25 /
    Bober
    null

  • An error occurred: Save document failed / An error occurred while saving the document: PATH (HDB 00055)

    Hello Colleagues, I am creating an analysis in build 576, everything goes well, the algorithm calculates the needed values, but when I try to save the analysis, I receive the following error message: "An error occurred: Save document failed / An error occurred while saving the document: <PATH> (HDB 00055)".
    Does anyone know what could cause this error message?
    Thanks a lot for any hint.
    Sergey

    Hi Henry,
    I am using PA 1.0.11 and received this error; any update on this fix for SAP PA. Does this happen for a particular data source.
    I am currently using Excel as source and whenever I try to use this data; I get this even if I move the data to a new file or rename a file. I tried to check the same issue with a different file and it works fine. This file worked fine a day back.
    Please let me know if this is unusual for this version.
    Regards,
    Arvind E

  • Error while saving the excise invoice

    Hi All,
    I am getting the following error while saving the excise invoice.
    No account is specified in item 0000000001
    Message no. F5670
    Diagnosis
    No account was specified for account type "S" in item "0000000001" of the FI/CO document.
    System Response
    The Financial Accounting program cannot process the document.
    Procedure
    A system error has probably occurred in the application you called up. Check the data transferred to item "0000000001" of the FI/CO document.
    I have read all the posts with regards to the error before, however still after doing the required settings I am getting the error. Please let me know for the same.
    Kind Regards
    Atul Keshav

    Dear All,
    The issue stands resolved please find below the required settings which need to be done.
    You need to maintain the following entries in  J_1ITRNACC table
    100 DLFC 01 CR PLAAED
    100 DLFC 01 CR PLABED
    100 DLFC 01 CR PLACESS
    100 DLFC 01 CR PLASED
    100 DLFC 01 CR PLAAT1
    100 DLFC 01 CR RG23AAt1
    100 DLFC 01 CR RG23AED
    100 DLFC 01 CR RG23BED
    100 DLFC 01 CR RG23SED
    100 DLFC 01 DR MSUSP
    Also the table J_1ITRNACC should include entries for GRPO, CAPE, DIEX, EWPO,
    TR6C with subtransaction type 01.
    We need to maintain GL Accounts accordingly in the table  J_1IEXCACC.
    If still the error persists then you need to apply the following notes.
    1018071
    978186
    1032813
    The SAP note 1032813 contains the correction for the program MJ1IINF01
    you will have to apply this manually.
    Kind Regards
    Atul Keshav

  • Error while detrmining Internal Document Number for Excise Invoice.

    Hello mate, I am trying to create excise invoice for for factory sale. while saving the document I am getting an error" Error
    while detrmining Internal Document Number for Excise Invoice. Message: Maintain Number Range for J_1IINTNUM". I have already maintained number range for mentioned object "J_1INTNUM" in TCODE SNUM , still getting error. Please solve my querry . Is it related to transport or number range activation or something else? I have maintained number range with serial no. "01"

    Hello ,
    Ensure that number ranges are properly maintained in the respective client that should be the year specific.Some times even u maintained the system should not consider that number ranges  due to table updation problem ,because i had faced the same in the earlier and received the reply from the sap stating that this error was occured rarely after the years,so please ignore that ,for your problem u first come out of the screen and then re log in and then create the excise invoice ,then check the number ranges .
    Please revert for any
    Kalyan

Maybe you are looking for

  • Why can't I get the full resolution on my Ultrawide monitor when connected to my MBP?

    I just purchased an LG Ultrawide 29" monitor to hook up to my Macbook Pro (Mid-2010 model). The full resolution should be 2560x1080. The only cable that came with the monitor was an HDMI to HDMI cable, so I used a miniDisplayport to HDMI cable that I

  • Mail: missing plug-in

    I cannot seem to be able to view PDF files attached to emails whether at the compose stage and attaching PDFs or at the receive stage with PDF file attached to incoming email. Quick Look works well on PDFs all the same and Save button does show the P

  • HT5622 How to create free apple id

    How to create free apple id

  • How to get list of users using  IN OIM

    Experts, Is it possible to get the list of users who have logged into OIM in past (for example last six months)? as not all people in my organization uses OIM. Please suggest if OIM(version 9.1.02) has any such functionality or if it is possible to g

  • AC_DOCUMENT_DIRECT_INPUT ..Amount multiplied with 100

    Hello, We have developed  custom posting program which posts FBB1 document using AC_DOCUMENT_DIRECT_INPUT  program. While testing the program in development client the posting was correct.  However, while testing the same program in production client