I toyed with adding the ODF Validator to a pre-ingest toolset.
When I ran the Windows build (odf-validator-0.20-beta-1-windows.exe) on the attached spreadsheet I get the exception below.
Simply running the tool to get the help message works.
The execption result doesn't change if I use -e or not, or use different -o outputs.
The same exception happens if I run the tool from its directory or use absolute paths to the exe or the ods.
Is it possible that a schema document wasn't (properly) embedded in the executable?
(Interestingly, when I use the original xlsx version of the spreadsheet I get (the seemingly correct):
APP-1: [INFO] Validating ........\testcorpora\spreadsheets\test_spreadsheet.xlsx.
APP-4: [INFO] Validation report for ........\testcorpora\spreadsheets\test_spreadsheet.xlsx.
DOC-2: [INFO] package OpenDocument version unknown detected.
PKG-4: [WARNING] mimetype An OpenDocument Package SHOULD contain a file 'mimetype'.
PKG-3: [ERROR] META-INF\manifest.xml An OpenDocument Package SHALL contain a file 'META-INF/manifest.xml'.
PKG-7: [WARNING] Thumbnails\thumbnail.png An OpenDocument Package SHOULD contain a preview image Thumbnails/thumbnail.png.
NOT VALID, 1 errors, 2 warnings and 1 info messages.)
Exception output:
XXXXXXXXXX\tools\odf-validator\win>odf-validator-0.20-beta-1-windows.exe ........\testcorpora\spreadsheets\test_spreadsheet.ods
APP-1: [INFO] Validating ........\testcorpora\spreadsheets\test_spreadsheet.ods.
SYS-4: [FATAL] ........\testcorpora\spreadsheets\test_spreadsheet.ods Package ........\testcorpora\spreadsheets\test_spreadsheet.ods could not be parsed, due to an exception.
An unexpected error occurred during validation: java.lang.IllegalStateException: Problem loading internal schema document
java.lang.IllegalStateException: Problem loading internal schema document
at org.openpreservation.odf.xml.OdfSchemaFactory.getSchemas(OdfSchemaFactory.java:141)
at org.openpreservation.odf.xml.OdfSchemaFactory.getSchema(OdfSchemaFactory.java:125)
at org.openpreservation.odf.validation.ValidatingParserImpl.validateOdfXmlDocument(ValidatingParserImpl.java:152)
at org.openpreservation.odf.validation.ValidatingParserImpl.validatePackageXml(ValidatingParserImpl.java:131)
at org.openpreservation.odf.validation.ValidatingParserImpl.validateXmlEntry(ValidatingParserImpl.java:121)
at org.openpreservation.odf.validation.ValidatingParserImpl.validateOdfXmlEntries(ValidatingParserImpl.java:105)
at org.openpreservation.odf.validation.ValidatingParserImpl.validate(ValidatingParserImpl.java:95)
at org.openpreservation.odf.validation.ValidatingParserImpl.validatePackage(ValidatingParserImpl.java:73)
at org.openpreservation.odf.validation.OdfValidatorImpl.validatePackage(OdfValidatorImpl.java:125)
at org.openpreservation.odf.validation.OdfValidatorImpl.validate(OdfValidatorImpl.java:86)
at org.openpreservation.odf.apps.CliValidator.validatePath(CliValidator.java:111)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:90)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:39)
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:135)
Caused by: org.xml.sax.SAXParseException
at com.thaiopensource.relaxng.jaxp.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:80)
at com.thaiopensource.validation.SchemaFactory2.newSchema(SchemaFactory2.java:59)
at com.thaiopensource.validation.SchemaFactory2.newSchema(SchemaFactory2.java:39)
at com.thaiopensource.validation.SchemaFactory2.newSchema(SchemaFactory2.java:24)
at org.openpreservation.odf.xml.OdfSchemaFactory.getSchemas(OdfSchemaFactory.java:139)
... 21 more
Caused by: java.net.MalformedURLException
at java.base@17.0.12/java.net.URL.(URL.java:708)
at java.base@17.0.12/java.net.URL.(URL.java:569)
at java.base@17.0.12/java.net.URL.(URL.java:516)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.thaiopensource.relaxng.parse.sax.SAXParseable.parse(SAXParseable.java:39)
at com.thaiopensource.relaxng.pattern.SchemaBuilderImpl.parse(SchemaBuilderImpl.java:76)
at com.thaiopensource.relaxng.jaxp.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:76)
... 25 more
Caused by: java.lang.NullPointerException
at java.base@17.0.12/java.net.URL.(URL.java:614)
... 37 more
test_spreadsheet.ods
I toyed with adding the ODF Validator to a pre-ingest toolset.
When I ran the Windows build (odf-validator-0.20-beta-1-windows.exe) on the attached spreadsheet I get the exception below.
Simply running the tool to get the help message works.
The execption result doesn't change if I use -e or not, or use different -o outputs.
The same exception happens if I run the tool from its directory or use absolute paths to the exe or the ods.
Is it possible that a schema document wasn't (properly) embedded in the executable?
(Interestingly, when I use the original xlsx version of the spreadsheet I get (the seemingly correct):
APP-1: [INFO] Validating ........\testcorpora\spreadsheets\test_spreadsheet.xlsx.
APP-4: [INFO] Validation report for ........\testcorpora\spreadsheets\test_spreadsheet.xlsx.
DOC-2: [INFO] package OpenDocument version unknown detected.
PKG-4: [WARNING] mimetype An OpenDocument Package SHOULD contain a file 'mimetype'.
PKG-3: [ERROR] META-INF\manifest.xml An OpenDocument Package SHALL contain a file 'META-INF/manifest.xml'.
PKG-7: [WARNING] Thumbnails\thumbnail.png An OpenDocument Package SHOULD contain a preview image Thumbnails/thumbnail.png.
NOT VALID, 1 errors, 2 warnings and 1 info messages.)
Exception output:
XXXXXXXXXX\tools\odf-validator\win>odf-validator-0.20-beta-1-windows.exe ........\testcorpora\spreadsheets\test_spreadsheet.ods
APP-1: [INFO] Validating ........\testcorpora\spreadsheets\test_spreadsheet.ods.
SYS-4: [FATAL] ........\testcorpora\spreadsheets\test_spreadsheet.ods Package ........\testcorpora\spreadsheets\test_spreadsheet.ods could not be parsed, due to an exception.
An unexpected error occurred during validation: java.lang.IllegalStateException: Problem loading internal schema document
java.lang.IllegalStateException: Problem loading internal schema document
at org.openpreservation.odf.xml.OdfSchemaFactory.getSchemas(OdfSchemaFactory.java:141)
at org.openpreservation.odf.xml.OdfSchemaFactory.getSchema(OdfSchemaFactory.java:125)
at org.openpreservation.odf.validation.ValidatingParserImpl.validateOdfXmlDocument(ValidatingParserImpl.java:152)
at org.openpreservation.odf.validation.ValidatingParserImpl.validatePackageXml(ValidatingParserImpl.java:131)
at org.openpreservation.odf.validation.ValidatingParserImpl.validateXmlEntry(ValidatingParserImpl.java:121)
at org.openpreservation.odf.validation.ValidatingParserImpl.validateOdfXmlEntries(ValidatingParserImpl.java:105)
at org.openpreservation.odf.validation.ValidatingParserImpl.validate(ValidatingParserImpl.java:95)
at org.openpreservation.odf.validation.ValidatingParserImpl.validatePackage(ValidatingParserImpl.java:73)
at org.openpreservation.odf.validation.OdfValidatorImpl.validatePackage(OdfValidatorImpl.java:125)
at org.openpreservation.odf.validation.OdfValidatorImpl.validate(OdfValidatorImpl.java:86)
at org.openpreservation.odf.apps.CliValidator.validatePath(CliValidator.java:111)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:90)
at org.openpreservation.odf.apps.CliValidator.call(CliValidator.java:39)
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:135)
Caused by: org.xml.sax.SAXParseException
at com.thaiopensource.relaxng.jaxp.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:80)
at com.thaiopensource.validation.SchemaFactory2.newSchema(SchemaFactory2.java:59)
at com.thaiopensource.validation.SchemaFactory2.newSchema(SchemaFactory2.java:39)
at com.thaiopensource.validation.SchemaFactory2.newSchema(SchemaFactory2.java:24)
at org.openpreservation.odf.xml.OdfSchemaFactory.getSchemas(OdfSchemaFactory.java:139)
... 21 more
Caused by: java.net.MalformedURLException
at java.base@17.0.12/java.net.URL.(URL.java:708)
at java.base@17.0.12/java.net.URL.(URL.java:569)
at java.base@17.0.12/java.net.URL.(URL.java:516)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.thaiopensource.relaxng.parse.sax.SAXParseable.parse(SAXParseable.java:39)
at com.thaiopensource.relaxng.pattern.SchemaBuilderImpl.parse(SchemaBuilderImpl.java:76)
at com.thaiopensource.relaxng.jaxp.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:76)
... 25 more
Caused by: java.lang.NullPointerException
at java.base@17.0.12/java.net.URL.(URL.java:614)
... 37 more
test_spreadsheet.ods