aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)" Watch "Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)" New topic
Author

Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)

KashanHCL Ahmad
Greenhorn

Joined: Sep 09, 2006
Posts: 1
I am trying to config application in Sun One Portal server 3.0 SP5 , (Sun Solaris 8)during configuration I was trying to import some xml files however during the process I got the error :
Exception in thread "main" java.lang.OutOfMemoryError.

I tried increasing the size of the heap in jvm12.conf to 512 MB and even tried to run the command -Xms512M, but this didn't help.

Pls respond as asap.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
You probably might have written a inefficient coding.you can do a profiling of the program for finding out as which operation of the program has lead to memory leaks..one more thing is while using xml ..you should be very careful.Not in all senarios DOM is useful..there are many senarios where SAX and even StAX (Streaming API for XML.covered in JCP 152 (not very sure abount his number.))is better.If you give as what exactly are you trying to do with the xml can help to suggest more.


Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)