incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svante Schubert (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ODFTOOLKIT-377) Error writing large .ods files (3 MB)
Date Thu, 12 Sep 2013 17:08:52 GMT

    [ https://issues.apache.org/jira/browse/ODFTOOLKIT-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765630#comment-13765630
] 

Svante Schubert commented on ODFTOOLKIT-377:
--------------------------------------------

Seems it was by coincidence in the RDFa class as the memory went out, with the prior RDFa
module the error was the same, but in a different place:
java.lang.OutOfMemoryError: GC overhead limit exceeded
	at java.util.Arrays.copyOf(Arrays.java:2271)
	at java.util.zip.ZipCoder.getBytes(ZipCoder.java:89)
	at java.util.zip.ZipFile.getEntry(ZipFile.java:306)
	at java.util.jar.JarFile.getEntry(JarFile.java:226)
	at java.util.jar.JarFile.getJarEntry(JarFile.java:209)
	at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:832)
	at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:810)
	at sun.misc.URLClassPath.findResource(URLClassPath.java:176)
	at java.net.URLClassLoader$2.run(URLClassLoader.java:551)
	at java.net.URLClassLoader$2.run(URLClassLoader.java:549)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findResource(URLClassLoader.java:548)
	at java.lang.ClassLoader.getResource(ClassLoader.java:1139)
	at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:227)
	at javax.xml.stream.SecuritySupport$4.run(SecuritySupport.java:94)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.xml.stream.SecuritySupport.getResourceAsStream(SecuritySupport.java:87)
	at javax.xml.stream.FactoryFinder.findJarServiceProvider(FactoryFinder.java:317)
	at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:289)
	at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:213)
	at javax.xml.stream.XMLEventFactory.newInstance(XMLEventFactory.java:59)
	at net.rootdev.javardfa.Parser.<init>(Parser.java:43)
	at org.odftoolkit.odfdom.pkg.rdfa.RDFaParser.<init>(RDFaParser.java:63)
	at org.odftoolkit.odfdom.pkg.rdfa.DOMRDFaParser.<init>(DOMRDFaParser.java:44)
	at org.odftoolkit.odfdom.pkg.rdfa.DOMRDFaParser.createInstance(DOMRDFaParser.java:38)
	at org.odftoolkit.odfdom.pkg.OdfFileDom.updateInContentMetadataCache(OdfFileDom.java:691)
	at org.odftoolkit.odfdom.dom.element.text.TextParagraphElementBase.onInsertNode(TextParagraphElementBase.java:300)
	at org.odftoolkit.odfdom.pkg.OdfElement.onInsertNode(OdfElement.java:478)
	at org.odftoolkit.odfdom.pkg.OdfElement.insertBefore(OdfElement.java:490)
	at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
	at org.odftoolkit.odfdom.pkg.OdfFileSaxHandler.startElement(OdfFileSaxHandler.java:121)

I will keep this issue in mind, when I move the changes back to the main repository.
                
> Error writing large .ods files (3 MB)
> -------------------------------------
>
>                 Key: ODFTOOLKIT-377
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-377
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: java, odfdom, performance, simple api
>    Affects Versions: 0.5-incubating
>         Environment: Windows 7, java 1.7
>            Reporter: Jacinto Verdaguer
>              Labels: patch, performance
>             Fix For: 0.5-incubating
>
>
> I'm modifying file metadata .ods, the application works correctly for files under 3 MB
but in the case of files larger of 2,8 MB it creates a file 2 KB and get locked by the java
process. No java error display.
> My code is as follows:
> doc = OdfDocument.loadDocument(new File("C:\tmp\ficheroIn.ods"));
> OdfFileDom metadom = doc.getMetaDom();
> Meta metadata = new Meta(metadom);
> metadata.setTitle(plantilla.getTitulo());
> metadata.setSubject(plantilla.getAsunto());
> metadata.setCreator(plantilla.getModificadoPor());
> metadata.setDescription(plantilla.getComentarios());
> doc.save("C:\tmp\ficheroOut.ods");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message