incubator-odf-dev mailing list archives

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

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

Jacinto Verdaguer commented on ODFTOOLKIT-377:
----------------------------------------------

The error occurs with any file 3 MB.

Tried to update to the latest 0.6 (odfdom-java-0.8.9-incubating.jar, simple-odf-0.8-incubating.jar
and xercesImpl-2.9.1.jar) but now not even read the source file.

Runs the line doc=OdfDocument.loadDocument(new File(fileIn)) and jumps directly to the finally
block, no errors display.

try {
    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");
 
} catch (Exception ex) {
  plantilla.setErrorProceso(true);

} finally {
    if(doc != null)
       doc.close();
}

My environment is: Windows 7 (64 bits), Java 1.6
                
> 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