axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Marsala" <Ma...@PeerSoftware.com>
Subject [Axis2] Possible Java Memory Leak when Transferring Large Files
Date Thu, 07 Aug 2008 16:22:57 GMT
I'm currently working on a project for uploading files to the
Docstoc.com web service. The code generated by the wsdl2java utility (in
the form of the com.docstoc.ws package) has been working quite well
until I try to upload files over 5 or 6 MB. When attempting to upload
these larger files, the JVM's allocated memory gets sucked up and causes
the following error to occur. The
com.docstoc.ws.UploadFileCompressed.serialize methods ultimately call
the writeDataHandler method of the
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter class
and pass in a javax.activation.DataHandler object containing file
content on the local system. I've tried to download the nightly Axis2
snapshots to see if the issue still exists but it appears as if the
hosting server is down. Has anyone seen anything like this before? Any
help would be greatly appreciated.

 

 

Exception in thread "Thread-7" java.lang.OutOfMemoryError: Java heap
space

                at java.lang.String.<init>(String.java:208)

                at
java.lang.StringBuffer.toString(StringBuffer.java:586)

                at
org.apache.axiom.om.util.TextHelper.toString(TextHelper.java:36)

                at
org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:269)

                at
org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255
)

                at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextIm
pl.java:433)

                at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMT
extImpl.java:408)

                at
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDa
taHandler(MTOMAwareXMLSerializer.java:172)

                at
com.docstoc.ws.UploadFileCompressed.serialize(UploadFileCompressed.java:
853)

                at
com.docstoc.ws.UploadFileCompressed.serialize(UploadFileCompressed.java:
711)

                at
com.docstoc.ws.UploadFileCompressed$1.serialize(UploadFileCompressed.jav
a:696)

                at
org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:
93)

                at
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndC
onsume(OMSourcedElementImpl.java:664)

                at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:918)

                at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:947)

                at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOA
PEnvelopeImpl.java:240)

                at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
nvelopeImpl.java:228)

                at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:947)

                at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
java:471)

                at
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage
Formatter.java:79)

                at
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisReque
stEntity.java:84)

                at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(EntityEnclosingMethod.java:499)

                at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase
.java:2114)

                at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:1096)

                at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe
thodDirector.java:398)

                at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:171)

                at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
97)

                at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
46)

                at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
tHTTPSender.java:542)

                at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1
89)

                at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)

                at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:364)

 

 

Thanks for your time,

Matt Marsala

mattm@peersoftware.com

 

 


Mime
View raw message