Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

out of memory

 
neha gowda
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are transforming an XML document to html using the XSL transformation from within Websphere Studio.

The input file is 5.2 MB
The xsl file is 18 kb

When we do the transformation, after a while it runs out of memory. It gives the following error: Exception in thread "main" java.lang.OutOfMemoryError <<no stack trace available>>

We have tried changing the jvm parameters.

Please let us know if you have any idea to overcome this problem

neha
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The DOM for a 5MB XML file is going to be pretty large, and of course the data structures built for the transformation can also be large.
What memory settings have you tried?
Bill
 
neha gowda
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have checked with JVM settings, changed the heap capacity etc. But
nothing seems to work.
Plz lemme know if we have do any change in the seettings

Neha
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to run the transformation outside of WSAD with just the transformation-related code (you can use this program), give the JVM some 128MB of heap and see if that's enough. Then, start to cut down the maximum heap size until you start getting the OutOfMemoryError.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also try to debug the code by "stepping into" the XSLT engine and see what it's trying to do when it runs out of memory. Also, a bit easier way could be to run a profiler against the code doing a transformation -- it might tell you where all that memory is going.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic