| Author |
Out of Memory Error in my TransportMessage class
|
John Mazz
Greenhorn
Joined: Oct 05, 2005
Posts: 3
|
|
Hi All, Im a Java newbie who is having problems isolating the root cause for an out of Memory error I am getting when tring to transfer files larger then 20 megs using SOAP I am working with some lecagy production code in a that is supose to upload a file from my server, and then upload into a 3rd party product via a SOAP call. This java appliation acts as a middle man that picks up files created by one application and then loads it into another. the current code works fine on files under 20Megs, but generates an "Out of Memeory" error when they are larger then this. Current JVM version 1.3.1 My current SOAP libs are Appache Axis... (dont know what version they are, but the files appear they are from 5/2002) I suspect that somewhere in my AXIS jars the entire file is being read into memory insead of being buffered. Does this sound correct or is the poblem possible the older 1.3.1 verion JVM Has anyone run across this or know a fix? Thanks Mazz
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
I suspect that somewhere in my AXIS jars the entire file is being read into memory insead of being buffered.
I think you are correct - and possibly the entire file is being parsed, thus adding to the memory use. Your toolkits are really out of date. Moving big files with SOAP should be done with "attachments" - see the SAAJ - Soap with Attachments for Java API. The only quick fix is to give your app more memory and given that you have no control over the end application, thats probably what you are going to end up with. See the Java Tooldocs for your Java installation for command line control of memory allocation. Bill
|
Java Resources at www.wbrogden.com
|
 |
Ashutosh Shahi
Ranch Hand
Joined: Feb 06, 2005
Posts: 36
|
|
|
Not sure about Apache axis, but such a problem existed in Sun's implementation of saaj and has been resolved, See: https://saaj.dev.java.net/issues/show_bug.cgi?id=8
|
<a href="http://blogs.sun.com/roller/page/ashutosh" target="_blank" rel="nofollow">http://blogs.sun.com/roller/page/ashutosh</a>
|
 |
 |
|
|
subject: Out of Memory Error in my TransportMessage class
|
|
|