Write XML CLOB 10 MB in size to an XML file

Hi,
I am trying to export a table into an XML file. Using various examples, I have learned that is really easy to handle objects smaller that 32767 bytes (characters).
The problem is working with big chunks. My XML CLOB is just over 10 MB in size. I can easilly break it into smaller pieces but then I risk to write chr(10) in the middle of a XML Tag (which happened). I have an idea of finding a way around the problem but there are two issues:
1. DBMS_LOB.instr function returns 0 if offset grows above appx 1100.
2. I tried this in oreder to avid the limitation from item 1.:
for c = 1..dbms_lob.getlength(CLOB) loop
dbms_lob.read(CLOB,c,1,MyString);
if MyString = chr(10) then
utl_file.put_line(MyLine);
MyLine := '';
else
MyLine := MyLine || MyString;
end if;
end loop;
This way I generate perfect XML structure, and it takes about an hour of cpu time to create 2.3 MB file. I have tried to run ir for a big one, and it took just over 7 hours to get to 10.2 MB when I had shut it down.
Does anybody has any suggestions?

utl_file.put(...) will write the contents of the buffer without a newline
utl_file.put_line will write the contents of the buffer plus a newline character. So, if you use utl_file.put_line(largebuffer) you will get a newline character after the buffer that may break tags.
The following should produce the string:
<tag>
in a file:
utl_file.put(fil, '<ta');
utl_file.put(fil, 'g>');
the following PL/SQL code will produce the string:
<ta
g>
in a file:
utl_file.put_line(fil, '<ta');
utl_file.put_line(fil, 'g>');
Are you saying that utl_file.put() is putting newlines in a file?
This can be because you are not setting MAXLINESIZE for the file to 32767 (or >= your buffer size ) in fopen:
UTL_FILE.FOPEN (
location IN VARCHAR2,
filename IN VARCHAR2,
open_mode IN VARCHAR2,
max_linesize IN BINARY_INTEGER) <<<<<<<<<<< set this to 32767 >>>>>>>>>>>>>>>>>>
RETURN file_type;
Larry

Similar Messages

  • How to write a CLOB to file using UTF-8

    I'm new to java and I have the following problem.
    I need to write a CLOB to file using the UTF-8 characterset (I'm generating an xml file). My database characterset is WE8ISO8859P15.
    I've tried the code below but the resulting output fails validation in an xml editor due to an 'invalid character' error :
    create or replace
    and compile
    java source named "ClobUtil"
    as
    import java.io.*;
    import java.lang.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.*;
    public class ClobUtil {
    public static void save(CLOB clob, String filename) throws Exception
    Connection conn = DriverManager.getConnection("jdbc:oracle:kprb:");
    conn.setAutoCommit(false);
    InputStream is = clob.getCharacterStream();
    FileOutputStream os = new FileOutputStream(filename);
    int size = clob.getChunkSize();
    byte buffer[] = new byte[size];
    int length;
    while ((length = is.read(buffer, 0, size)) != -1) {
    os.write(buffer, 0, length);
    is.close();
    os.close();
    conn.close();
    I see that the getCharacterStream() method returns a Unicode character stream but how do I output this to file ??
    Thanks in advance

    File file = new File( "myfile.utf8" );
    FileOutputStream fos = new FileOutputStream( file );
    OutputStreamWriter osw = new
    OutputStreamWriter( fos, "UTF8" );
    Writer w = new BufferedWriter( osw );
    PrintWriter out = new PrintWriter( w );
    Or whatever you need. Note that this merely allows you to specify the encoding to be used in the output file, it does convert the encoding for you. I think in your case this will work since you already know the output stream will not contain the full range of UTF8 characters anyway.

  • The size of a XML document stored in a XMLType table

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

  • Xml clob to file

    We are using the following java to write a PL/SQL generated xml clobs to the file system. The help in this forum has been priceless.
    At this point the xml filesare being produced but have character issues. I am guessing it is basic JAVA and yes I am new to JAVA.
    1. Small clobs have trailing box characters (carraige returns)
    2. Larger files have tags broken
    Any input is appreciated.
    Thanks
    create or replace and compile java source named sjs.write_CLOB as
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    public class write_CLOB extends Object
    public static void pass_str_array(oracle.sql.CLOB p_in,java.lang.String f_in)
    throws java.sql.SQLException, IOException
    File target = new File(f_in);
    FileWriter fw = new FileWriter(target);
    BufferedWriter out = new BufferedWriter(fw);
    Reader is = p_in.getCharacterStream();
    char buffer[] = new char[8192];
    int length;
    while( (length=is.read(buffer,0,8192)) != -1) {
    out.write(buffer);
    // out.newLine();
    is.close();
    fw.close();
    /

    We are still hung up on this. I tried implementing the code from STEVE'S XML book but still haven't resovled it.
    The clob is being created via XSU see below. The new char[8192] appeasr to force the output file to 8K
    with trailing characters on small clobs but adds a carraige return each 8K on larger ones.
    As usual any input is appreciated from all. Doese anyone know of a good JAVA forum like this one?
    Thanks
    PROCEDURE BuildXml(v_return OUT INTEGER, v_message OUT VARCHAR2,string_in VARCHAR2,xml_CLOB OUT NOCOPY CLOB) IS
    queryCtx DBMS_XMLquery.ctxType;
    Buffer RAW(1024);
    Amount BINARY_INTEGER := 1024;
    Position INTEGER := 1;
    sql_string VARCHAR2(2000) := string_in;
    BEGIN
    v_return := 1;
    v_message := 'BuildXml completed succesfully.';
    queryCtx := DBMS_XMLQuery.newContext(sql_string);
    xml_CLOB := DBMS_XMLQuery.getXML(queryCtx);
    DBMS_XMLQuery.closeContext(queryCtx);
    EXCEPTION WHEN OTHERS THEN
    v_return := 0;
    v_message := 'BuildXml failed - '||SQLERRM;
    END BuildXml;
    PROCEDURE WriteCLOB(v_return OUT INTEGER, v_message OUT VARCHAR2,result IN OUT NOCOPY CLOB,TargetDirectory IN VARCHAR2,FileName IN VARCHAR2) IS
    BEGIN
    v_return := 1;
    v_message := 'WriteCLOB completed succesfully.';
    write_CLOB(result,REPLACE(TargetDirectory||'\'||FileName,'\','/'));
    EXCEPTION WHEN OTHERS THEN
    v_return := 0;
    v_message := 'WriteCLOB failed - '||SQLERRM;
    END WriteCLOB;
    create or replace and compile java source named sjs.write_CLOB as
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    public class write_CLOB extends Object
    public static void pass_str_array(oracle.sql.CLOB p_in,java.lang.String f_in)
    throws java.sql.SQLException, IOException
    File target = new File(f_in);
    FileWriter fw = new FileWriter(target);
    BufferedWriter out = new BufferedWriter(fw);
    Reader is = p_in.getCharacterStream();
    char buffer[] = new char[8192];
    int length;
    while( (length=is.read(buffer)) != -1) {
    out.write(buffer);
    is.close();
    fw.close();
    /

  • 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

  • How do you include the actual CLOB value as ASCII when writing XML?

    When using the XDK for PL/SQL ( creating XML from query ) and the table that you query has a CLOB column the value in the resulting XML document is
    written as:
    <column>(CLOB)</column>
    how do you get the api to write the actual CLOB data?

    That article is talking about choosing HOW to STORE an XML document.
    I want to know how to write the contents of a CLOB column along with the other columns in a table in a single XML document.
    I know how to store an XML doc as a clob I know how to store an XML doc object relationally.
    I I have a table with 5 varchar2 columns 5 number columns and 1 clob column and I create an xml document as a clob from a select * on that table. I then write that clob to the file system. What is the clob columns data going to look like?
    its gonna be <column>(CLOB)</column> THATS NOT WHAT I WANT. I want the actual data that was in that CLOB column.
    Thank you for all responses.

  • How can we display dynamic fields from a XML CLOB?

    Jdeveloper Version : 11.1.1.4.0 (11g)
    We are calling a database package.procedure from a page VO and it returns a result set. The result set is mainly a XML CLOB. Within XML CLOB, we have various sections which we need to parse and display those on JSF page. Couple of sections within XML are having dynamic fields which means the number of fields returned under that section may change depending upon data conditions. We need to find technical way of displaying those dynamic fields (field name and its data – both are part of XML).
    Please suggest how can this be achieved.
    Thanks

    <?xml version="1.0" encoding="UTF-8" ?>
    <nodes>
    <node>
    <category_id>3</category_id>
    <parent_id>2</parent_id>
    <name>Mobile</name>
    <is_active>1</is_active>
    <position>1</position>
    <level>2</level>
    <children>
    <node name="Nokia" category_id="6" parent_id="3" is_active="1" position="1" level="3">
    <node name="Nokia N79" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N95" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N97" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    </node>
    <node name="Samsung" category_id="7" parent_id="3" is_active="1" position="2" level="3">
    </node>
    </children>
    </node>
    <node>
    <category_id>4</category_id>
    <parent_id>2</parent_id>
    <name>Laptop</name>
    <is_active>1</is_active>
    <position>2</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>5</category_id>
    <parent_id>2</parent_id>
    <name>Monitor</name>
    <is_active>1</is_active>
    <position>3</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>8</category_id>
    <parent_id>2</parent_id>
    <name>Camera</name>
    <is_active>1</is_active>
    <position>4</position>
    <level>2</level>
    <children></children>
    </node>
    </nodes>
    Is this correct format to create dynamic menu?

  • Need to update the xml clob-pls pls help!

    my xml is stored as blob, i can view,do string manipulation and churn out data etc...but now i have a request where i need to find some particualr node and modify its value.
    here is what i m doing now which works.
    select compressor2.blob_decompress2(xml_data) into l_blob
    from tablename where id=2008890;
    clob_data := utl2.blob2clob(l_blob);
    parser := xmlparser.newParser;
    xmlparser.parseClob(parser, clob_data);
    doc := xmlparser.getDocument(parser);
    nl := xmldom.getElementsByTagName(doc, '*');
    len := xmldom.getLength(nl);
    dbms_output.put_line('Length : ' || len);
    tag_name := 'Node Verson : ' || xmldom.getVersion(doc)|| '<br>';
    for counter in 0..len-1
    loop
    tag_name := '';
    node := xmldom.item(nl, counter);
    parent_node := xmldom.getParentNode(node);
    child_node := xmldom.getfirstchild(node);
    tag_name := 'Parent Name : ' || xmldom.getNodeName(parent_node) || '<br>';
    tag_name := tag_name || 'Node Name : ' || xmldom.getNodeName(node) || '<br>';
    IF xmldom.getNodeType(child_node) = xmldom.TEXT_NODE THEN
    tag_name := tag_name || 'Node Value : ' || xmldom.getNodeValue(child_node)|| '<br>';
    ELSE
    tag_name := tag_name || 'Node Value : Node has child.No Node value.' || '<br>';
    END IF;
    tag_name := tag_name || 'Node Type : '||xmldom.getNodeType(child_node) || '<br>';
    ele_name := xmldom.getDocumentElement(doc);
    child_nl := xmldom.getElementsByTagName(ele_name,'*');
    IF xmldom.isNull(doc) THEN
    htp.p('Document is null');
    ELSE
    htp.p(tag_name);
    END IF;
    end loop;
    b_blob := utl.clob2blob(tag_name);
    select compressor2.blob_compress2(b_blob) into b_blob2 from dual;
    insert into xupdate values (2008890,b_blob2);
    i still need to know how to update the xml clob... i want to know how to find the particular node and then modify the clob with the new value. rest i can update the table.
    pls pls help..on this.

    my oracle version.
    10.2.0.1.0
    i want to update here..
    <?xml version="1.0" encoding="utf-8"?>
    <TestData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <Status>CompletedNormally</TestCompletionStatus>
         <ComputerName>DUILT10</ComputerName>
         <StartTime>2008-03-19T15:12:23</StartTime>
    ---Some more noded----
    <Parameters>
              <RangeMeasured>
                   <Name>PDissBol-5[C]</Name>
                   <Min>1.22</Min>
                   <Max>1.36</Max>
                   <Units>W</Units>
              </RangeMeasured>
              <TextMeasured>
                   <Name>ComputerName</Name>
                   <Value>DUILT10</Value>
              </TextMeasured>
              <RangeMeasured>
                   <Name>TrackError25[C]To-5[C]</Name>
                   <Min>0.031</Min>
                   <Max>0.041</Max>
                   <Units>dB</Units>
              </RangeMeasured>
              <RangeMeasured>
                   <Name>Power-5[C]</Name>
                   <Min>1.988</Min>
                   <Max>1.061</Max>
                   <Units>dBm</Units>
              </RangeMeasured>
    ---some more noded---
    </Parameters>
    </TestData>
    the file is huge.
    what i need to chang==>
    I 1st need to find this PDissBol-5[C] within the <Parameters> Node and then change its <Min> and <Max>
    and then update the table.
    pls pls suggest.

  • Maximum input payload size(for an XML file) supported by OSB

    Hey Everyone,
    I wanted to know, what is the maximum payload size that OSB can handle.
    The requirement is to pass XML files as input to OSB and insert the data of the XML files in the oracle staging tables. The OSB will host all the .jca,wsdl, xml, xml schema and other files required to perform the operation.
    The hurdle is to understand, what is the maximum XML file size limit, that OSB can allow to pass through without breaking.
    I did some test runs and got the following output,
    Size of the XML file:  OSB successfully read a file of size, 3176kb but failed for a file of size 3922kb, so the OSB breakpoint occurs somewhere between 3-4 MB, as per the test runs.
    Range of number of Lines of XML:  102995 to 126787, since OSB was able to consume a file with lines (102995) and size 3176kb but broke for a file with number of lines (126787) and size 3922kb.
    Request to please share your views on the test runs regarding the OSB breakpoint and also kindly share the results, if the same test has been performed at your end.
    Thank you very much.

    Hey Everyone,
    I wanted to know, what is the maximum payload size that OSB can handle.
    The requirement is to pass XML files as input to OSB and insert the data of the XML files in the oracle staging tables. The OSB will host all the .jca,wsdl, xml, xml schema and other files required to perform the operation.
    The hurdle is to understand, what is the maximum XML file size limit, that OSB can allow to pass through without breaking.
    I did some test runs and got the following output,
    Size of the XML file:  OSB successfully read a file of size, 3176kb but failed for a file of size 3922kb, so the OSB breakpoint occurs somewhere between 3-4 MB, as per the test runs.
    Range of number of Lines of XML:  102995 to 126787, since OSB was able to consume a file with lines (102995) and size 3176kb but broke for a file with number of lines (126787) and size 3922kb.
    Request to please share your views on the test runs regarding the OSB breakpoint and also kindly share the results, if the same test has been performed at your end.
    Thank you very much.

  • Maximum size of an XML attribute?

    What is the maximum size of an XML attribute?
    I can't find this define in the OMG XML specification. Does the Oracle XML parser have a maximum size of an XML attribute? Do other XML parsers on the market have any limitation? ... we need to exchange XML documents with other vendors. Thanks.

    While I can't speak for other parsers, the Oracle ones do not have an attribute size limit.
    Oracle XML Team
    null

  • 64k size limit for XML node

    HI,
    Is 64k still the limit size for an XML NODE in oracle 10g version.
    Thanks,

    You keep asking all these XML questions...
    Have you considered asking on the XML DB forum?
    XML DB
    That's usually the best place for XML issues.

  • XMLStreamException: Unable to write XML string which starts with the illegal XML char 0x0000

    Hi,
    I am trying to run a WebLogic 8.1 Workshop webservice using Tuxedo Controls. I
    am running in to an XML error:
    <faultcode>JWSError</faultcode>
    <faultstring>com.bea.xml.marshal.XmlEncodingException: Error writing XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which starts with
    the illegal XML char 0x0000</faultstring>
    <detail>
    If i look into the application server log file, It says:
    <FML32Deserializer::deserializeInteger>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer> <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <Exception deserializing field BUFFERSIZE, exception: weblogic.jws.control.ControlException:
    Error getting field BUFFERSIZE as a Integer, exception: 4 (FNOTPRES)>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer> <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <FML32Deserializer::deserializeField - Name=ROWID, type=class java.lang.String>
    But these fields are in the field table class file generated using java weblogic.wtc.jatmi.mkfldclass32

    I am pasting the response i get while i try to run this web service using WebLogic
    Workshop.
    Anyones help would be much appreciated.
    Thanks,
    Deepak
    Service Response
    Submitted at Friday, December 19, 2003 1:25:00 PM CST
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>com.bea.xml.marshal.XmlEncodingException: Error writing XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which starts with
    the illegal XML char 0x0000</faultstring>
    <detail>
    com.bea.wlw.runtime.core.request.ResponseValidationException: com.bea.xml.marshal.XmlEncodingException:
    Error writing XML stream: com.bea.xml.pure.XMLStreamException: Unable to write
    XML string which starts with the illegal XML char 0x0000
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.setReturnValue(MimeXmlResponse.java:35)
    at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:242)
    at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
    at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:159)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:134)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:46)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.exploreExec(HttpServerHelper.java:253)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:570)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6316)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Caused by: com.bea.xml.marshal.XmlEncodingException: Error writing XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which starts with
    the illegal XML char 0x0000
    at com.bea.xml.marshal.MarshalContext.error(MarshalContext.java:140)
    at com.bea.xml.marshal.MarshalContext.writeCharacterData(MarshalContext.java:178)
    at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:79)
    at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
    at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:358)
    at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349)
    at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
    at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.writePart(MimeXmlResponse.java:105)
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.writeOutputPart(MimeXmlResponse.java:97)
    at com.bea.wlw.runtime.jws.request.MimeXmlResponse.setReturnValue(MimeXmlResponse.java:31)
    ... 22 more
    </detail>
    </error>
    "Deepak" <[email protected]> wrote:
    >
    >
    >
    Hi,
    I am trying to run a WebLogic 8.1 Workshop webservice using Tuxedo Controls.
    I
    am running in to an XML error:
    <faultcode>JWSError</faultcode>
    <faultstring>com.bea.xml.marshal.XmlEncodingException: Error writing
    XML stream:
    com.bea.xml.pure.XMLStreamException: Unable to write XML string which
    starts with
    the illegal XML char 0x0000</faultstring>
    <detail>
    If i look into the application server log file, It says:
    <FML32Deserializer::deserializeInteger>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer>
    <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <Exception deserializing field BUFFERSIZE, exception: weblogic.jws.control.ControlException:
    Error getting field BUFFERSIZE as a Integer, exception: 4 (FNOTPRES)>
    ####<Dec 19, 2003 1:25:00 PM CST> <Debug> <WLW> <centurytelweb> <cgServer>
    <ExecuteThread:
    '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-0237CF026485B78A2335>
    <000000> <FML32Deserializer::deserializeField - Name=ROWID, type=class
    java.lang.String>
    But these fields are in the field table class file generated using java
    weblogic.wtc.jatmi.mkfldclass32

  • What is the size limit of TEXT file while dumping a report through iBot?

    Hi Gurus,
    We have Siebel Analytics 7.8.5. We need to dump a huge report in text file through iBot for data processing.
    But we need to know Is there any limit for TEXT file generation through iBot?
    Thanks in Advance
    Regards
    Sudipta
    Edited by: Sudipta Gupta on Sep 30, 2011 7:47 PM

    Hi,
    I hope you can send 2MB ,if your getting any error try to increase rows in your instanceconfig.xml file kindly do the below things
    You need to increase the size and need to include one tag in instanceconfig.xml to increase the size and restart the presentation services.
    by default delivers will send only 250 records.
    take a original backup and the do it
    insert the following code into instanceconfig.xml.
    <Views>
    <Table> <DefaultRowsDisplayedInDelivery>100000</Defau ltRowsDisplayedInDelivery>
    </Table>
    </Views>
    restart all your services.
    for more refer
    http://oraclebizint.wordpress.com/2007/12/17/oracle-bi-ee-101332-calling-java-scripts-and-java-classes-from-ibots/
    Hope this solves the problem...
    THanks
    Deva

  • HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7

    All -
    I'm new to consuming web services in JDeveloper. I'm using Oracle JDEV 10.1.3.3/OC4J.  I'm using this version since it is compatible with Oracle EBS 12.1.3.  My intent is to pull data from our third party recruitment app (Success Factors) and load that data into Oracle HRIS.  I'm already doing this through a .NET application.  I'm converting it to be a Java Concurrent Program in EBS.  The code listed below is a stub call to verify I'm on the right track. I created a JDeveloper Web Services proxy project.  I'm testing it locally on my windows desktop.  When I'm able to consume the service successfully, then I'll think about moving it to the EBS server.
    I'm getting the following error when I invoke the following service:
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    End point is: https://api4.successfactors.com/sfapi/v1/soap?wsdl
    Any help/assistance would be much appreciated. 
    Below is my code and output of my test:
    package emsc.oracle.apps.emscper.sfapi.proxy;
    import HTTPClient.HTTPConnection;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSession;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSessionResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Login;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResult;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Logout;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LogoutResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFCredential;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFParameter;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Error;
    import java.io.File;
    import javax.xml.rpc.ServiceFactory;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Date;
    import javax.xml.ws.BindingProvider;
    import javax.xml.soap.SOAPException;
    import java.util.Map;
    import oracle.security.ssl.OracleSSLCredential;
    public class SFAPITest {
        // Declare members:      
        private String companyId;
        private String userName;
        private String password;
        private String developerKey;
        private Date   effDt;
        private String greaterThanEffDt;
        private String lessThanEffDt;
        // Declare constants:      
        final static private String breakLine = "+---------------------------------------------------------------------------+";
        final static private String format    = "yyyy-mm-dd";      
        private enum ReqId {
            PrimaryReq(25),
            PrimaryReqCEO(26),
            EmCarePrimary(27),
            RTI(28),
            EmCareClinical(29);
            private int reqId; 
            private ReqId() {
            private ReqId(int value) {
                reqId = value;
            public int getReqId() {
                return reqId;
        // Getters and Setters:  
        protected String getCompanyId() {
           return this.companyId;
        protected void setCompanyId(String value) {
           this.companyId = value;                 
        protected String getUserName() {
           return this.userName;
        protected void setUserName(String value) {
           this.userName = value;                 
        protected String getPassword() {
           return this.password;
        protected void setPassword(String value) {
           this.password = value;                 
        protected String getDeveloperKey() {
           return this.developerKey;
        protected void setDeveloperKey(String value) {
           this.developerKey = value;                 
        protected Date getEffDt() {
            return this.effDt;
        protected void setEffDt(Date value) {
            this.effDt = value;                 
        protected String getGreaterThanEffDt() {
           return this.greaterThanEffDt;
        protected void setGreaterThanEffDt(String value) {
           this.greaterThanEffDt = value;                 
        protected String getLessThanEffDt() {
           return this.lessThanEffDt;
        protected void setLessThanEffDt(String value) {
           this.lessThanEffDt = value;                 
        public void runProgram()
            SFAPIService mySFAPIService;
            String CompletionText = "";
            String effDtStr2 = null;
        /* Code your program logic here.
        * Use getJDBCConnection method to get the connection object for any
        * JDBC operations.
        * Use CpContext provided commit,rollback methods to commit/rollback
        * data base transactions.
        * Don't forget to release the connection before returning from this
        * method.
        /* Call setCompletion method to set the request completion status and
        * completion text.
        * Status values are ReqCompletion.NORMAL,ReqCompletion.WARNING,
        * ReqCompletion.ERROR.
        * Use Completion text message of length 240 characters. If it is more
        * than 240 then full string will appear in log file and truncated 240
        * characters will be used as request completion text.
        try
            ServiceFactory factory = ServiceFactory.newInstance();
            mySFAPIService = (emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService)factory.loadService(emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService.class);      
            SFAPI api = mySFAPIService.getSFAPI();
           /// SFAPI api = new SFAPI();
            //Map<String, Object> requestContext = ((BindingProvider) api).getRequestContext();
            //requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
            System.out.println("ServiceName => " + mySFAPIService.getServiceName().toString());
            System.out.println("End Point   => " + mySFAPIService.getServiceName().toString());
            System.out.println(breakLine);
            // Authentication: Login to SFAPI:
            SFCredential credential = new SFCredential();
            // Fake credentials being passed in for this post:   
            credential.setCompanyId("XXX");
            credential.setUsername("XXX");
            credential.setPassword("XXX");
            credential.setDeveloperKey("XXX");
            HTTPConnection httpsConnection = null;       
            OracleSSLCredential _credential = new OracleSSLCredential();      
            _credential.setWallet("\\\\\\C:\\Program Files\\Java\\jdk1.6.0_33\\jre\\lib\\security", "ParkEstes3");
            /*System.setProperty("javax.net.ssl.trustStore","C:\\\\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\keystore");
            System.setProperty("javax.net.ssl.trustStorePassword","changeit");  
            System.out.println(System.getProperty("javax.net.ssl.trustStore"));*/
            // SFParameter: Define a generic SFParameter List.  This is a necessary parameter
            // to invoking calls in SFAPI:      
             /*System.setProperty("javax.net.ssl.keyStore",
             "file:\\\C:\\jdk1.4.1\\jre\\lib\\security\\client.keystore");
             System.setProperty("javax.net.ssl.keyStorePassword","welcome");         */
            /*  System.setProperty("oracle.net.wallet_location",
                          "(SOURCE=(METHOD=file)(METHOD_DATA=(DIRECTORY=\\\C:\Users\dparrish\Oracle\WALLETS)))");  // (2)                     */
            File kstore = new File("C:\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\jssecacerts");
            boolean exists = kstore.exists();
            if (!exists) {
                System.out.println("Keystore does not exist");
            else {
                System.out.println("Keystore does exist");
            System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
            System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
            //System.setProperty("proxySet", "false");
            //System.setProperty("http.proxyHost", "127.0.0.1");
            //System.setProperty("http.proxyPort", "8080");
            System.out.println(kstore.getAbsolutePath());
            List<SFParameter> lst = new ArrayList<SFParameter>();
            SFParameter param = new SFParameter();
            param.setName("");
            param.setValue("");
            lst.add(param);      
            SFParameter[] sfParam = lst.toArray(new SFParameter[lst.size()]);
            Login login = new Login();
            try {
                login.setCredential(credential);
                System.out.println("1");
                login.setParam(sfParam);
                System.out.println("2");
                LoginResponse loginResponse = new  LoginResponse();
                LoginResult loginResult = new LoginResult();
                try {
                     loginResponse = api.login(login);               
                catch (Exception e ) {
                    System.out.println(e.getMessage());
                System.out.println("3");
                try {               
                     loginResult = loginResponse.getResult();
                catch (Exception e ) {
                    System.out.println(e.getMessage());
                System.out.println("4");
                IsValidSession vs = new IsValidSession();                  
                IsValidSessionResponse isValidSessionResponse = api.isValidSession(vs);
                System.out.println("5");
                if (isValidSessionResponse.isResult()) {
                     System.out.println("Session is valid");
                     System.out.println("Result => " + loginResult.getSessionId());
                     System.out.println(breakLine);              
                    Logout logout = new Logout();
                    LogoutResponse logoutResponse = api.logout(logout);
                    if (logoutResponse.isResult()) {
                         System.out.println("Logout of SFAPI Successful");
                    else {
                        System.out.println("Logout of SFAPI Unsuccessful");
                else {
                     System.out.println("Session is invalid");
                    List<Error> errors = new ArrayList<Error>();
                    for (int i = 0; i < loginResult.getError().length;  i++) {
                        errors.add(loginResult.getError()[i]);
                    for (int i = 0; i < errors.size(); i++) {
                         System.out.println("Error Indice   => " + i);
                         System.out.println("Error Code:    => " + errors.get(i).getErrorCode());
                         System.out.println("Error Message: => " + errors.get(i).getErrorMessage());
                         System.out.println(breakLine);                                                          
                    } // end for loop of SFObject errors
                } // end InvalidSession
            catch (Exception e)
                 System.out.println("Session Credential Exception");
                 System.out.println("Exception => " + e.getMessage());
                 System.out.println(breakLine);                   
        catch (Exception e)
            System.out.println("Parameter List Exception");
            System.out.println("Exception => " + e.getMessage());
            System.out.println(breakLine);
        }   // end runProgram
        // Constructor:
        public SFAPITest()  {
        } // end constructor
        public static void main (String args[]) {
            try
                SFAPITest test = new SFAPITest();        
                test.runProgram();
            catch (Exception e) {
                System.out.println("main exception => " + e.getMessage());
    } // SFAPITest
    Here is the output with trace:
    WARNING: Unable to connect to URL: https://api4.successfactors.com:443/sfapi/v1/soap due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    Session Credential Exception
    Exception => ; nested exception is:
        HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    +---------------------------------------------------------------------------+
    Process exited with exit code 0.

    The other end is throwing back a programming error.
    That might be because you are sending incorrect data and the other end fails to validate it.
    You might be able to guess based on your C# code.  But, since you are using soap one generic solution is available to you.
    - Get an http proxy interceptor like wireshark.
    - Run it while your C# app runs, collect the http requests from that.
    - Run it while running your java code, collect the http requests from that.
    Compare the two.

  • How to increase the size of Redo log files?

    Hi All,
    I have 10g R2 RAC on RHEL. As of now, i have 3 redo log files of 50MB size. i have used redo log size advisor by setting fast_start_mttr_target=1800 to check the optimal size of the redologs, it is showing 400MB. Now, i want to increase the size of redo log files. how to increase it?
    If we are supposed to do it on production, how to do?
    I found the following in one of the article....
    "The size of the redo log files can influence performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Generally, larger redo log files provide better performance, however it must balanced out with the expected recovery time.Undersized log files increase checkpoint activity and increase CPU usage."
    I did not understand the the point however it must balanced out with the expected recovery time in the above given paragraph.
    Can anybody help me?
    Thanks,
    Praveen.

    You dont have to shutdown the database before dropping redo log group but make sure you have atleast two other redo log groups. Also note that you cannot drop active redo log group.
    Here is nice link,
    http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_34.shtml
    And make sure you test this in test database first. Production should be touched only after you are really comfortable with this procedure.

Maybe you are looking for

  • Problem with configuration of wifi newtork- dhcp

    hi. i've got a small problem with configuration of wi-fi network. i use dhcp network. there are some errors about network during boot up (but its to fast for my to write it down) after log-in i have to setup network access by typing iwconfig eth2 ess

  • My iPod crashed and now it won't download anything

    I left my 20G iPod to download all of my music when I went to bed, and when I woke up both it and my computer were frozen. Since then everytime I plug it in it only downloads about 100 to 200 songs and then freezes up again. I've restarted and restor

  • PO Released Report

    Dear all, Is there any report to see the PO creation date & Releasing Date. Regards, Manish Jain

  • Safari crash when viewing mjpeg on ios 6

    I have found that after some time of viewing mjpeg on any web page safari browser quits unexpectedly. Furthermore, any mjpeg-viewing app, which I found in the AppStore have the same problem, all of them quits unexpectedly after some time. The problem

  • Application and jdi/jvmti agent in single vm?

    We're building a suite of monitoring tools that will help us inspect and manage our enterprise-class app. We currently have working an instrumenting interface (via mbeans) that uses javassist to instrument bytecode; this tool runs as an agent within