Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Out of Memory in Java transformation for large XMLdata

Thread view: 
Prashant Parashar - 23 Nov 2005 07:07 GMT
I am using Java transformer (Xalan) to transform large XML
data with some XSL.
And whenever the data is too large (>50 MB), I get Out of memory error.

I am wondering, is there a way out?

Any help would be appreciated.
Kitaec Roman 1972452496 - 22 Nov 2005 09:00 GMT
> I am using Java transformer (Xalan) to transform large XML
> data with some XSL.
> And whenever the data is too large (>50 MB), I get Out of memory error.
>
> I am wondering, is there a way out?

give JVM more memory by editing start parameters?

Signature

Roman.

Kitaec Roman - 22 Nov 2005 09:03 GMT
> I am using Java transformer (Xalan) to transform large XML
> data with some XSL.
[quoted text clipped - 3 lines]
>
> Any help would be appreciated.

Give JVM more memory by editing start parameters or use another XML parser.

--
Roman.
leuchter@gmx.ch - 23 Nov 2005 10:37 GMT
I don't remember wht the bug-id was, but there was one fixed in Java
1.4.2_09. It had something to do with buffers.
perhaps you try to update
Thomas Hawtin - 23 Nov 2005 11:49 GMT
> I don't remember wht the bug-id was, but there was one fixed in Java
> 1.4.2_09. It had something to do with buffers.
> perhaps you try to update

You are probably thinking of StringBuffers not freeing their memory when
length is set to zero (not a bug, obviously).

I think in this case it's just that the size of the XML file is huge. Or
more precisely, the in memory representation of the XML file is huge.
Xalan, currently, always keeps the entire source in memory throughout
the processing.

Other than increasing memory, it may be possible to write a simple SAX
transformation that cuts down on unnecessary information within the file.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.