• Post Reply Bookmark Topic Watch Topic
  • New Topic

Out of Memory Error in my TransportMessage class

 
John Mazz
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ashutosh Shahi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!