Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-431

OutOfMemoryError: Java heap space on save file.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.7-incubating
    • None
    • java, odfdom, simple api
    • None
    • Windows 8.1, JAVA 1.7 64 bits, Eclipse Luna, Jboss 6.2 EAP

    Description

      I get this error "OutOfMemoryError: Java heap space", when save a file with 1500 rows or more.

      I try solve this split the list data

      I tried to solve this split data list into smaller parts and save and load the ods file. I use de function insertRowsBefore to append new rows. But its not work for me. When save load the table, append new row list and save, the save function save a full table again and I get the error.

      Edit: My rows has thirty-five columns.

      I try to use this versions:
      <dependency>
      <groupId>org.odftoolkit</groupId>
      <artifactId>simple-odf</artifactId>
      <version>0.6.6</version>
      </dependency>

      and

      <dependency>
      <groupId>org.apache.odftoolkit</groupId>
      <artifactId>simple-odf</artifactId>
      <version>0.7-incubating</version>
      </dependency>

      Error details:
      13:45:12,821 INFO [stdout] Excepción: java.lang.OutOfMemoryError: Java heap space
      13:45:12,822 INFO [stdout] (asyncExecutor-1) at java.util.Arrays.copyOf(Arrays.java:2271)
      13:45:12,822 INFO [stdout] (asyncExecutor-1) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
      13:45:12,822 INFO [stdout] (asyncExecutor-1) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
      13:45:12,822 INFO [stdout] (asyncExecutor-1) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
      13:45:12,823 INFO [stdout] (asyncExecutor-1) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
      13:45:12,823 INFO [stdout] (asyncExecutor-1) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
      13:45:12,823 INFO [stdout] (asyncExecutor-1) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
      13:45:12,823 INFO [stdout] (asyncExecutor-1) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
      13:45:12,823 INFO [stdout] (asyncExecutor-1) at java.io.Writer.write(Writer.java:127)
      13:45:12,824 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.Printer.printText(Unknown Source)
      13:45:12,824 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.XMLSerializer.printAttribute(Unknown Source)
      13:45:12,824 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
      13:45:12,824 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
      13:45:12,824 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
      13:45:12,824 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
      13:45:12,825 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source)
      13:45:12,825 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
      13:45:12,825 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown Source)
      13:45:12,825 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.BaseMarkupSerializer.serialize(Unknown Source)
      13:45:12,826 INFO [stdout] (asyncExecutor-1) at org.apache.xml.serialize.DOMSerializerImpl.write(Unknown Source)
      13:45:12,826 INFO [stdout] (asyncExecutor-1) at org.odftoolkit.odfdom.pkg.OdfPackage.flushDom(OdfPackage.java:1626)
      13:45:12,826 INFO [stdout] (asyncExecutor-1) at org.odftoolkit.odfdom.pkg.OdfPackage.getBytes(OdfPackage.java:1566)
      13:45:12,826 INFO [stdout] (asyncExecutor-1) at org.odftoolkit.odfdom.pkg.OdfPackage.save(OdfPackage.java:877)
      13:45:12,827 INFO [stdout] (asyncExecutor-1) at org.odftoolkit.odfdom.pkg.OdfPackage.save(OdfPackage.java:823)
      13:45:12,827 INFO [stdout] (asyncExecutor-1) at org.odftoolkit.simple.Document.save(Document.java:728)
      13:45:12,827 INFO [stdout] (asyncExecutor-1) at org.odftoolkit.odfdom.pkg.OdfPackageDocument.save(OdfPackageDocument.java:228)
      // Log for my custom functions and services
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) | java.lang.OutOfMemoryError: Java heap space
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at java.util.Arrays.copyOf(Arrays.java:2271)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
      13:45:12,828 INFO [stdout] (asyncExecutor-1) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
      13:45:12,829 INFO [stdout] (asyncExecutor-1) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
      13:45:12,829 INFO [stdout] (asyncExecutor-1) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
      13:45:12,829 INFO [stdout] (asyncExecutor-1) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
      13:45:12,829 INFO [stdout] (asyncExecutor-1) at java.io.Writer.write(Writer.java:127)|

      Attachments

        Activity

          People

            Unassigned Unassigned
            omblanco Oscar Martínez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: