• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Out of Memory Error in my TransportMessage class

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic