incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vicente Villegas Larios (JIRA)" <>
Subject [jira] [Updated] (ODFTOOLKIT-333) Exception in thread "main" java.lang.OutOfMemoryError
Date Fri, 17 Aug 2012 15:47:37 GMT


Vicente Villegas Larios updated ODFTOOLKIT-333:

    Attachment: bigFile.ods

this is the file with the data that is causing out of memory
> Exception in thread "main" java.lang.OutOfMemoryError
> -----------------------------------------------------
>                 Key: ODFTOOLKIT-333
>                 URL:
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: odfdom, performance, simple api
>    Affects Versions: 0.8.7, 0.8.8
>            Reporter: Vicente Villegas Larios
>         Attachments: bigFile.ods
> I have been facing an issue related to "Out of Memory", so I'm trying to read a ODS file
with 1.4 MB and ODF code is throwing the following exception.
> Exception in thread "main" java.lang.OutOfMemoryError
> 	at java.util.Arrays.copyOfRange(Unknown Source)
> 	at java.util.Arrays.copyOf(Unknown Source)
> 	at
> 	at
> 	at org.odftoolkit.odfdom.pkg.StreamHelper.transformStream(
> 	at org.odftoolkit.odfdom.pkg.OdfPackage.getBytes(
> 	at org.odftoolkit.odfdom.pkg.OdfPackage.getInputStream(
> 	at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(
> 	at org.odftoolkit.odfdom.dom.OdfContentDom.initialize(
> 	at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(
> 	at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(
> 	at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(
> 	at org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(
> 	at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(
> 	at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(
> 	at org.odftoolkit.simple.Document.getContentRoot(
> 	at org.odftoolkit.simple.SpreadsheetDocument.getContentRoot(
> I know that ODF files are like zip files, so I changed the extension to "zip" and extracted
to a folder, it seems like the folder size is 180MB.
> Beside that I exported the content to a "xls"  file and I used POI to perform the same
operation and seemed to work ok with POI. Seems like ODFtoolkit doesn't has support to read
big files.
> I notice that the content is stored in a XML file, thinking about it, seems like ODF
is using DOM instead of SAX parser. 
> Is there any one who can help me to fix this problem? 
> I'm attaching the "ods" file with the data that throws the out of memory.
> Many thanks

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message