Closed Laurira closed 1 year ago
Hi Lauri,
Could I have access to the metadata.xml file?
You can omit the schema information.
I sent you the info to the e-mail.
I assumed I had siard-1 file but instead it was actually siard-2. It may be useful when application would produce better error message for users with similar intellect. Either way my conversion from siard-2.0 to siard-2.1 worked perfectly. Thanks Miguel.
I am trying to convert siard-1 to siard-2. Very old siard. I get "ERROR Fatal error while converting the database (The metadata.xml file could not be read.)"
What to do now?
Log file: 2023-08-31 12:11:50,735 [main] INFO (c.d.m.m.f.ProgressLoggerObserver) Initializing database 2023-08-31 12:11:50,834 [main] INFO (c.d.m.s.i.i.SIARDImportDefault) Importing SIARD version 1.0 2023-08-31 12:11:50,838 [main] INFO (c.d.m.s.o.o.SIARDExportDefault) Exporting SIARD version 2.1 2023-08-31 12:11:51,142 [main] WARN (c.d.m.s.i.m.SIARD1MetadataImportStrategy) The metadata.xml file did not pass the XML Schema validation. com.databasepreservation.model.exception.ModuleException: Error while Unmarshalling JAXB with XSD at com.databasepreservation.modules.siard.in.metadata.SIARD1MetadataImportStrategy.loadMetadata(SIARD1MetadataImportStrategy.java:149) at com.databasepreservation.modules.siard.in.input.SIARDImportDefault.migrateDatabaseTo(SIARDImportDefault.java:58) at com.databasepreservation.DatabaseMigration.migrate(DatabaseMigration.java:123) at com.databasepreservation.Main.runMigration(Main.java:294) at com.databasepreservation.Main.internalMain(Main.java:125) at com.databasepreservation.Main.main(Main.java:81) Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.bar.admin.ch/xmlns/siard/2.0/metadata.xsd", local:"siardArchive"). Expected elements are <{http://www.bar.admin.ch/xmlns/siard/1.0/metadata.xsd}siardArchive> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:726) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:247) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:242) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:109) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1131) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:556) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:538) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:87) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:153) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1653) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:473) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:419) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:248) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204) at com.databasepreservation.modules.siard.in.metadata.SIARD1MetadataImportStrategy.loadMetadata(SIARD1MetadataImportStrategy.java:147) ... 5 common frames omitted
I also tried to validate that siard-1 file, then got following: 2023-09-06 09:31:11,115 [main] ERROR (c.d.Main) Unexpected parse exception occurred. org.apache.commons.cli.ParseException: Unexpected parse exception occurred. at com.databasepreservation.cli.CLIValidate.getValidationArguments(CLIValidate.java:125) at com.databasepreservation.cli.CLIValidate.parse(CLIValidate.java:82) at com.databasepreservation.cli.CLIValidate.getValidateModuleFactory(CLIValidate.java:72) at com.databasepreservation.Main.runValidation(Main.java:177) at com.databasepreservation.Main.internalMain(Main.java:129) at com.databasepreservation.Main.main(Main.java:81)