- install Nuxeo
- install nuxeo-dam addon
- create a workspace
- create a note
- export using the Zip tree export
- install another Nuxeo with the same version
- don't install the nuxeo-dam addon
- drop the exported zip on the domain
This generates the following stack:
****** chain ****** Name: FileManager.ImportInSeam Exception: OperationException Caught error: Failed to invoke operation FileManager.Import Caused by: java.lang.NullPointerException ****** Hierarchy calls ****** org.nuxeo.ecm.automation.core.operations.services.FileManagerImport at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:238) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:121) at org.nuxeo.ecm.automation.server.jaxrs.batch.BatchManagerComponent.execute(BatchManagerComponent.java:302) ... 118 more Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation FileManager.Import at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:189) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:214) ... 120 more Caused by: java.lang.NullPointerException at org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter.loadFacetsInfo(AbstractDocumentModelWriter.java:226) at org.nuxeo.ecm.core.io.impl.AbstractDocumentModelWriter.createDocument(AbstractDocumentModelWriter.java:147) at org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter.doWrite(DocumentModelWriter.java:88) at org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter.write(DocumentModelWriter.java:75) at org.nuxeo.ecm.core.io.impl.AbstractDocumentWriter.write(AbstractDocumentWriter.java:53) at org.nuxeo.ecm.core.io.impl.DocumentPipeImpl.readAndWriteDocs(DocumentPipeImpl.java:127) at org.nuxeo.ecm.core.io.impl.DocumentPipeImpl.run(DocumentPipeImpl.java:102) at org.nuxeo.ecm.platform.routing.core.persistence.RouteModelsZipImporter.create(RouteModelsZipImporter.java:94) at org.nuxeo.ecm.platform.filemanager.service.FileManagerService.createDocumentFromBlob(FileManagerService.java:257) at org.nuxeo.ecm.automation.core.operations.services.FileManagerImport.run(FileManagerImport.java:76) at org.nuxeo.ecm.automation.core.operations.services.FileManagerImport.run(FileManagerImport.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:171) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:177) ... 123 more
The Picture type is unknown to the target instance and thus throws this stack.
In AbstractDocumentModelWriter.loadFacetsInfo there is no check for the document type which is null:
if (facetType == null) { log.warn("The document " + docModel.getName() + " with id=" + docModel.getId() + " and type=" + docModel.getDocumentType().getName() + " contains the facet '" + facet + "', which is not registered as available in the schemaManager. This facet will be ignored.");
The behavior that we actually want is the same behavior that we have when we import a document of an unknown document type that that does contain unknown facets: throw DocumentNotFoundException: Unknown document type: MyType
- depends on
-
NXP-14218 Fix XML import when using mixin facets
- Resolved