You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Tammy Dugan (JIRA)" <ji...@apache.org> on 2007/05/31 19:57:15 UTC

[jira] Created: (AXIS2-2743) OutOfMemory error returning large xml

OutOfMemory error returning large xml
-------------------------------------

                 Key: AXIS2-2743
                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.2
         Environment: Windows XP
            Reporter: Tammy Dugan
         Attachments: TestAxis2ReturnDataset.java

When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:

public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
	{
		XMLStreamReader reader = null;

		StreamingOMSerializer serializer = new StreamingOMSerializer();
		reader = getReader();
		System.out.println("before out of memory error");
		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
		System.out.println("after out of memory error");
		xmlWriter.flush();
	}

If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-2743:
----------------------------------------

    Assignee: Deepal Jayasinghe

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Deepal Jayasinghe
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas reassigned AXIS2-2743:
---------------------------------------

    Assignee: Davanum Srinivas  (was: Deepal Jayasinghe)

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505333 ] 

Davanum Srinivas commented on AXIS2-2743:
-----------------------------------------

Great! Awesome!

thanks,
dims

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Tammy Dugan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504783 ] 

Tammy Dugan commented on AXIS2-2743:
------------------------------------

I think I have a workaround. I can turn off MTOM for specific services. For my purposes, services that produce lots of xml don't have attachments.

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Tammy Dugan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505783 ] 

Tammy Dugan commented on AXIS2-2743:
------------------------------------

No problem. Thanks for getting it fixed.

Tammy

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Tammy Dugan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504744 ] 

Tammy Dugan commented on AXIS2-2743:
------------------------------------

I traced through the code and this is what I found:

// line 59 in MTOMXMLStreamWriter (format.isOptimized buffers all the output xml in a StringWriter)
 
public MTOMXMLStreamWriter(OutputStream outStream, OMOutputFormat format)
            throws XMLStreamException, FactoryConfigurationError {
        this.format = format;
        this.outStream = outStream;

        if (format.getCharSetEncoding() == null) //Default encoding is UTF-8
            format.setCharSetEncoding(OMOutputFormat.DEFAULT_CHAR_SET_ENCODING);

        if (format.isOptimized()) {
            bufferedSOAPBody = new StringWriter();
            xmlWriter = StAXUtils.createXMLStreamWriter(bufferedSOAPBody);
        } else {
            xmlWriter = StAXUtils.createXMLStreamWriter(outStream,
                                                        format.getCharSetEncoding());
        }
    }

// line 415 in OMNodeImpl (makes the XMLStreamWriter a MTOMXMLStreamWriter)

 public void serializeAndConsume(OutputStream output, OMOutputFormat format)
            throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format);
        internalSerializeAndConsume(writer);
        writer.flush();
        if (format.isAutoCloseWriter()) {
            writer.close();
        }
    }

//line 140 CommonsHTTPTransportSender (sets format.doOptimize to true since I'm using MTOM
public InvocationResponse invoke(MessageContext msgContext)
            throws AxisFault {
        try {
            OMOutputFormat format = new OMOutputFormat();
            // if (!msgContext.isDoingMTOM())
            msgContext.setDoingMTOM(HTTPTransportUtils.doWriteMTOM(msgContext));
            msgContext.setDoingSwA(HTTPTransportUtils.doWriteSwA(msgContext));
            msgContext.setDoingREST(HTTPTransportUtils.isDoingREST(msgContext));
            format.setSOAP11(msgContext.isSOAP11());
            format.setDoOptimize(msgContext.isDoingMTOM());

//line 41 of MIMEOutputUtils (the writer.toString() causes the output of memory error
public static void complete(OutputStream outStream,
                                StringWriter writer, LinkedList binaryNodeList,
                                String boundary, String contentId, String charSetEncoding,
                                String SOAPContentType) {
        try {
            startWritingMime(outStream, boundary);

            javax.activation.DataHandler dh = new javax.activation.DataHandler(writer.toString(),
                                                                               "text/xml; charset=" +
                                                                                       charSetEncoding);


Why does it have to buffer all the xml to use MTOM? Can I turn off the optimization and still use MTOM? Wouldn't it work to stream the body xml and buffer the attachments so the attachments can be optimized?

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Tammy Dugan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tammy Dugan updated AXIS2-2743:
-------------------------------

    Attachment: TestAxis2ReturnDataset.java

This should be a self contained test case. You will need to use your own large xml file. I got the error to occur with a 270 MB file.

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>         Attachments: TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas resolved AXIS2-2743.
-------------------------------------

    Resolution: Fixed

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Tammy Dugan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tammy Dugan updated AXIS2-2743:
-------------------------------

    Attachment: services.xml

Here is the service.xml to go with the test case.

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Tammy Dugan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504773 ] 

Tammy Dugan commented on AXIS2-2743:
------------------------------------

I experimented changing the following values in axis2.xml:

<parameter name="enableMTOM" locked="false">true</parameter>
<parameter name="enableSwA" locked="false">false</parameter>


If either parameter is true, I get the OutOfMemory exception. If both are false, the 171 MB xml body transfers just fine. It looks like the attachment handling code is buffering the xml. I need MTOM enabled and to send large xml soap bodies.

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2743) OutOfMemory error returning large xml

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505661 ] 

Davanum Srinivas commented on AXIS2-2743:
-----------------------------------------

Tammy,

I opened 2 related bugs one for RPCMessageReceiver and one for autogenerating enableMTOM flag in services.xml during wsdl2java. Thanks a ton for figuring this out.

-- dims

> OutOfMemory error returning large xml
> -------------------------------------
>
>                 Key: AXIS2-2743
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2743
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows XP
>            Reporter: Tammy Dugan
>            Assignee: Davanum Srinivas
>         Attachments: services.xml, TestAxis2ReturnDataset.java
>
>
> When I try to return 270 MB of xml from an axis2 service, I get an OutOfMemory error. I wrote my own CustomDataSource and the error occurs in the following serialize method:
> public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
> 	{
> 		XMLStreamReader reader = null;
> 		StreamingOMSerializer serializer = new StreamingOMSerializer();
> 		reader = getReader();
> 		System.out.println("before out of memory error");
> 		serializer.serialize(reader, xmlWriter);// OutOfMemory error here
> 		System.out.println("after out of memory error");
> 		xmlWriter.flush();
> 	}
> If I run the serialize locally and create my own xmlWriter, there is no error. However, if the serialize gets called from an axis2 service, an OutOfMemory error occurs. Because of this, I really think that axis2 is using a writer as input to XMLStreamWriter that is buffering all the data. It shouldn't be doing that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org