Skip to content

0.18.5 and 0.20 SYS-4: [FATAL] <file> could not be parsed, due to an exception. An unexpected error occurred during validation: java.util.NoSuchElementException: Entry styles.xml not found in zip file #282

@maria-messerschmidt

Description

@maria-messerschmidt

I have three scenarios that produce a SYS-4 FATAL level error, when run with DNA profile, but no unexpected errors with run with the profile. Files and text output from all three with and without profile are included below.

AT012.ods

AT012.ods

Output without profile:
APP-1: [INFO] Validating C:...\AT012.ods.
APP-4: [INFO] Validation report for C:...\AT012.ods.
DOC-2: [INFO] package OpenDocument version 1.3 detected.
DOC-3: [INFO] mimetype OpenDocument MIMETYPE application/vnd.oasis.opendocument.spreadsheet detected
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry styles.xml has no corresponding zip entry.
NOT VALID, 1 errors, 0 warnings and 2 info messages.

Output with profile:
APP-1: [INFO] Validating C:...\AT012.ods.
SYS-4: [FATAL] C:\U...\AT012.ods Package C:...\AT012.ods could not be parsed, due to an exception.
An unexpected error occurred during validation: java.util.NoSuchElementException: Entry styles.xml not found in zip file
java.util.NoSuchElementException: Entry styles.xml not found in zip file
at org.openpreservation.format.zip.ZipFileProcessor.getEntryInputStream(ZipFileProcessor.java:112)
at org.openpreservation.odf.pkg.OdfPackageImpl.getEntryStream(OdfPackageImpl.java:234)
at org.openpreservation.odf.validation.rules.SchematronRule.check(SchematronRule.java:62)
at org.openpreservation.odf.validation.rules.SchematronRule.check(SchematronRule.java:47)
at org.openpreservation.odf.validation.rules.ProfileImpl.getRulesetMessages(ProfileImpl.java:75)
at org.openpreservation.odf.validation.rules.ProfileImpl.check(ProfileImpl.java:56)
at org.openpreservation.odf.validation.OdfValidatorImpl.profile(OdfValidatorImpl.java:109)
at org.openpreservation.odf.apps.CliValidator.profilePath(CliValidator.java:104)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:68)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.openpreservation.odf.apps.CliValidator.main(CliValidator.java:117)

AT031.ods

AT031.ods

Output without profile:
APP-1: [INFO] Validating C:...\AT031.ods.
APP-4: [INFO] Validation report for C:...\AT031.ods.
DOC-2: [INFO] package OpenDocument version 1.3 detected.
PKG-5: [ERROR] META-INF\ny.xml An OpenDocument Package SHALL only contain the 'META-INF/manifest.xml' and files containg the term 'signatures' in their name in the 'META-INF' folder. File META-INF/ny.xml does not meet this criteria.
MIM-4: [ERROR] mimetype An OpenDocument Package SHALL contain a mimetype file IF the manifest contains a manifest:file-entry element whose manifest:full-path attribute has the value '/'.
MAN-6: [INFO] META-INF\manifest.xml The OpenDocument Package manifest NEED NOT contain entries for file paths starting with META-INF/, META-INF/manifest.
MAN-6: [INFO] META-INF\manifest.xml The OpenDocument Package manifest NEED NOT contain entries for file paths starting with META-INF/, META-INF/signatures.
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry Thumbnails/thumbnail.png has no corresponding zip entry.
MAN-3: [ERROR] META-INF\manifest.xml An OpenDocument Package manifest SHALL NOT contain a file entry the mimetype file.
MAN-1: [ERROR] extra.xml The manifest SHALL contain an entry for every file in the package, zip entry extra.xml has no corresponding manifest file entry.
PKG-7: [WARNING] Thumbnails\thumbnail.png An OpenDocument Package SHOULD contain a preview image Thumbnails/thumbnail.png.
PKG-2: [ERROR] styles.xml All files contained in the Zip file shall be non compressed (STORED) or compressed using the 'deflate' (DEFLATED) algorithm. Zip entry styles.xml is compressed with an unknown algorithm.
NOT VALID, 6 errors, 1 warnings and 3 info messages.

Output with profile:
APP-1: [INFO] Validating C:...\AT031.ods.
SYS-4: [FATAL] C:...\AT031.ods Package C:\Users\b340777\Desktop\testsuite\AT031.ods could not be parsed, due to an exception.
An unexpected error occurred during validation: java.util.NoSuchElementException: Entry META-INF/manifest not found in zip file
java.util.NoSuchElementException: Entry META-INF/manifest not found in zip file
at org.openpreservation.format.zip.ZipFileProcessor.getEntryInputStream(ZipFileProcessor.java:112)
at org.openpreservation.odf.pkg.OdfPackageImpl.getEntryStream(OdfPackageImpl.java:234)
at org.openpreservation.odf.validation.rules.MacroRule.getParseResult(MacroRule.java:78)
at org.openpreservation.odf.validation.rules.MacroRule.checkOdfScriptXml(MacroRule.java:64)
at org.openpreservation.odf.validation.rules.MacroRule.check(MacroRule.java:56)
at org.openpreservation.odf.validation.rules.MacroRule.check(MacroRule.java:43)
at org.openpreservation.odf.validation.rules.ProfileImpl.getRulesetMessages(ProfileImpl.java:75)
at org.openpreservation.odf.validation.rules.ProfileImpl.check(ProfileImpl.java:56)
at org.openpreservation.odf.validation.OdfValidatorImpl.profile(OdfValidatorImpl.java:109)
at org.openpreservation.odf.apps.CliValidator.profilePath(CliValidator.java:104)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:68)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.openpreservation.odf.apps.CliValidator.main(CliValidator.java:117)

AT069.ods

AT069.ods

Output without profile:
APP-1: [INFO] Validating C:\Users\b340777\Desktop\testsuite\AT069.ods.
APP-4: [INFO] Validation report for C:\Users\b340777\Desktop\testsuite\AT069.ods.
DOC-2: [INFO] package OpenDocument version 1.3 detected.
DOC-3: [INFO] mimetype OpenDocument MIMETYPE application/vnd.oasis.opendocument.spreadsheet detected
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry newfile.png has no corresponding zip entry.
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry newfile.txt has no corresponding zip entry.
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry meta.xml has no corresponding zip entry.
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry newfile.xml has no corresponding zip entry.
MAN-4: [ERROR] META-INF\manifest.xml The manifest SHALL contain an entry for every file in the package, manifest file entry styles.xml has no corresponding zip entry.
NOT VALID, 5 errors, 0 warnings and 2 info messages.

Output with profile:
APP-1: [INFO] Validating C:\Users\b340777\Desktop\testsuite\AT069.ods.
SYS-4: [FATAL] C:\Users\b340777\Desktop\testsuite\AT069.ods Package C:\Users\b340777\Desktop\testsuite\AT069.ods could not be parsed, due to an exception.
An unexpected error occurred during validation: java.util.NoSuchElementException: Entry meta.xml not found in zip file
java.util.NoSuchElementException: Entry meta.xml not found in zip file
at org.openpreservation.format.zip.ZipFileProcessor.getEntryInputStream(ZipFileProcessor.java:112)
at org.openpreservation.odf.pkg.OdfPackageImpl.getEntryStream(OdfPackageImpl.java:234)
at org.openpreservation.odf.validation.rules.SchematronRule.check(SchematronRule.java:62)
at org.openpreservation.odf.validation.rules.SchematronRule.check(SchematronRule.java:47)
at org.openpreservation.odf.validation.rules.ProfileImpl.getRulesetMessages(ProfileImpl.java:75)
at org.openpreservation.odf.validation.rules.ProfileImpl.check(ProfileImpl.java:56)
at org.openpreservation.odf.validation.OdfValidatorImpl.profile(OdfValidatorImpl.java:109)
at org.openpreservation.odf.apps.CliValidator.profilePath(CliValidator.java:104)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:68)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.openpreservation.odf.apps.CliValidator.main(CliValidator.java:117)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions