[
https://issues.apache.org/jira/browse/ODFTOOLKIT-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Svante Schubert updated ODFTOOLKIT-412:
---------------------------------------
Assignee: Svante Schubert
It is already fixed in the current version, please check out the sources and
built the project as described in:
http://incubator.apache.org/odftoolkit/source.html
But better use Maven3 and newer JDK, I will update the Wiki.
> Document.loadDocument(File file, String password) doesn't work for encrypted
> ods file
> -------------------------------------------------------------------------------------
>
> Key: ODFTOOLKIT-412
> URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-412
> Project: ODF Toolkit
> Issue Type: Bug
> Components: odfdom
> Environment: Redhat7/Libreoffice4.1/Eclipse3.8/Java1.7
> Reporter: william zhang
> Assignee: Svante Schubert
> Priority: Critical
>
> Referenced jar:
> -odfdom-java-0.8.10-incubation-SNAPSHOT-jar-with-dependencies.jar
> -simple-odf-0.8.1-incubation-SNAPSHOT-jar-with-dependencies.jar
> Steps:
> 1. Save a .ods file with password manually
> 2. Execute API "SpreadsheetDocument.load(filePath, password)", it throws
> NullPointerException.
> Reason:
> 1. In org.odftoolkit.odfdom.pkg.ZipHelper.line87,
> "System.getProperty("Java.version")" returns null, then it cause NPE.
> Obviously, the parameter here should use "java.version" instead.
> 2. The key point is line83, "inputStream.getNextEntry()" throws
> java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor.
> Remark:
> If use API Document.save(File file, String password) to save a new ods file
> with password, then invoke Document.loadDocument(File file, String password),
> it works.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)