GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes out of memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "out of memory" Watch "out of memory" New topic
Author

out of memory

neha gowda
Greenhorn

Joined: Feb 04, 2004
Posts: 23
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

Joined: Mar 22, 2000
Posts: 12792
    
    5
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

Joined: Feb 04, 2004
Posts: 23
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.
 
GeeCON Prague 2014
 
subject: out of memory