Exported empty classification cannot be imported

Description

Exported attached classfication in production with the "export all classification to directory"command. When trying to import this classification with the "update all classification from directory" the following error occurs:

INFO: Resolved to: jar:file:/Users/silvio/Development/Collections%20Workbench/tomcat-8.5.4/webapps/collections/WEB-INF/lib/mycore-base-2017.01-SNAPSHOT.jar!/xlink-2008-06.xsd.

ERROR: genreImgitem.xml: line 4, column 17, cvc-complex-type.2.4.b: The content of element 'categories' is not complete. One of '{category}' is expected.

org.xml.sax.SAXParseException; systemId: file:/Users/silvio/Development/Testdaten/2017-03-15_class/genreImgitem.xml; lineNumber: 4; columnNumber: 17; cvc-complex-type.2.4.b: The content of element 'categories' is not complete. One of '{category}' is expected.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:481)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3571)
at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(XMLSchemaValidator.java:3508)
at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidType(XMLSchemaValidator.java:3434)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processElementContent(XMLSchemaValidator.java:3336)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2383)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:817)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:275)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1065)
at org.mycore.common.xml.MCRXMLParserImpl.parseXML(MCRXMLParserImpl.java:84)
at org.mycore.frontend.cli.MCRClassification2Commands.updateFromURL(MCRClassification2Commands.java:150)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:253)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:323)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:291)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:386)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:270)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:201)
at org.mycore.util.concurrent.processing.MCRProcessableSupplier.get(MCRProcessableSupplier.java:79)
at org.mycore.util.concurrent.MCRPrioritySupplier.get(MCRPrioritySupplier.java:27)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

ERROR: Command 'update classification from url file:/Users/silvio/Development/Testdaten/2017-03-15_class/genreImgitem.xml' failed. Performing transaction rollback...

java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:253)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:323)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:291)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:386)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:270)
at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:201)
at org.mycore.util.concurrent.processing.MCRProcessableSupplier.get(MCRProcessableSupplier.java:79)
at org.mycore.util.concurrent.MCRPrioritySupplier.get(MCRPrioritySupplier.java:27)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.xml.sax.SAXParseException; systemId: file:/Users/silvio/Development/Testdaten/2017-03-15_class/genreImgitem.xml; lineNumber: 4; columnNumber: 17; cvc-complex-type.2.4.b: The content of element 'categories' is not complete. One of '{category}' is expected.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:481)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3571)
at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(XMLSchemaValidator.java:3508)
at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidType(XMLSchemaValidator.java:3434)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processElementContent(XMLSchemaValidator.java:3336)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2383)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:817)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:275)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1065)
at org.mycore.common.xml.MCRXMLParserImpl.parseXML(MCRXMLParserImpl.java:84)
at org.mycore.frontend.cli.MCRClassification2Commands.updateFromURL(MCRClassification2Commands.java:150)
... 19 more

Environment

None

Assignee

Matthias Eichner

Reporter

Silvio Hermann

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

High
Configure