*Steps to reproduce:*
1. Install the filter stream application 2. Install the DokuWiki Text extension 3. Download the contents of https://github.com/xwiki-contrib/dokuwiki/tree/master/dokuwiki-text/src/test/resources/dokuwikitext on the server that runs XWiki 4. Import {{file:<root>/dokuwiki-text/src/test/resources/dokuwikitext/dokuwiki-support-folder}} where {{<root>}} is the root of the DokuWiki importer using standard settings and output "xwiki+instance" 5. Import {{file:<root>/dokuwiki-text/src/test/resources/dokuwikitext/dokuwiki-contents.tgz}}.
*Expected result:*
Both imports are completed without errors.
*Actual result:*
There is an error in the second import
{noformat}
/home/michael/.xtool/instances/xtool-2cc6e15c/data/store/file/xwiki/0/9/404f163ec32bea1c82b5cb8c247861/attachments/6/4/fa2523e529fcafe1dbf844297b89d2/fv1.1.svg ( Datei oder Verzeichnis nicht gefunden File or directory not found ) class org.xwiki.store.UnexpectedException: Failed to get InputStream at org.xwiki.store.legacy.doc.internal.FilesystemAttachmentContent.getContentInputStream(FilesystemAttachmentContent.java:127) at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:924) at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:919) at com.xpn.xwiki.doc.XWikiDocument.retrieveDeletedAttachment(XWikiDocument.java:7234) at com.xpn.xwiki.doc.XWikiDocument.getAttachmentDiff(XWikiDocument.java:7198) at com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener.onDocumentUpdatedEvent(AttachmentEventGeneratorListener.java:139) at com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener.onEvent(AttachmentEventGeneratorListener.java:88) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:320) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:285) at com.xpn.xwiki.XWiki.afterSave(XWiki.java:2035) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2123) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2001) at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.maybeSaveDocument(DocumentInstanceOutputFilterStream.java:274) at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.endWikiDocumentLocale(DocumentInstanceOutputFilterStream.java:153) at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90) at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75) at com.sun.proxy.$Proxy190.endWikiDocumentLocale(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90) at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75) at com.sun.proxy.$Proxy191.endWikiDocumentLocale(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:63) at com.sun.proxy.$Proxy192.endWikiDocumentLocale(Unknown Source) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.readDocument(DokuWikiInputFilterStream.java:483) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.readAllDocuments(DokuWikiInputFilterStream.java:304) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.readDataStream(DokuWikiInputFilterStream.java:261) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.read(DokuWikiInputFilterStream.java:204) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.read(DokuWikiInputFilterStream.java:184) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.read(DokuWikiInputFilterStream.java:83) at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79) at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:97) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246) at org.xwiki.job.AbstractJob.run(AbstractJob.java:223) at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: class java.io.FileNotFoundException: /home/michael/.xtool/instances/xtool-2cc6e15c/data/store/file/xwiki/0/9/404f163ec32bea1c82b5cb8c247861/attachments/6/4/fa2523e529fcafe1dbf844297b89d2/fv1.1.svg (Datei oder Verzeichnis nicht gefunden) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:219) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157) at org.xwiki.store.legacy.doc.internal.FilesystemAttachmentContent.getContentInputStream(FilesystemAttachmentContent.java:125) at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:924) at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:919) at com.xpn.xwiki.doc.XWikiDocument.retrieveDeletedAttachment(XWikiDocument.java:7234) at com.xpn.xwiki.doc.XWikiDocument.getAttachmentDiff(XWikiDocument.java:7198) at com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener.onDocumentUpdatedEvent(AttachmentEventGeneratorListener.java:139) at com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener.onEvent(AttachmentEventGeneratorListener.java:88) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:320) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:285) at com.xpn.xwiki.XWiki.afterSave(XWiki.java:2035) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2123) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2001) at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.maybeSaveDocument(DocumentInstanceOutputFilterStream.java:274) at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.endWikiDocumentLocale(DocumentInstanceOutputFilterStream.java:153) at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90) at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75) at com.sun.proxy.$Proxy190.endWikiDocumentLocale(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90) at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75) at com.sun.proxy.$Proxy191.endWikiDocumentLocale(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor161.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90) at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:63) at com.sun.proxy.$Proxy192.endWikiDocumentLocale(Unknown Source) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.readDocument(DokuWikiInputFilterStream.java:483) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.readAllDocuments(DokuWikiInputFilterStream.java:304) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.readDataStream(DokuWikiInputFilterStream.java:261) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.read(DokuWikiInputFilterStream.java:204) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.read(DokuWikiInputFilterStream.java:184) at org.xwiki.contrib.dokuwiki.text.internal.input.DokuWikiInputFilterStream.read(DokuWikiInputFilterStream.java:83) at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79) at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:97) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246) at org.xwiki.job.AbstractJob.run(AbstractJob.java:223) at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) {noformat}
The main trigger seems to be that the import contains the same document but with different attachments, the first one has two while the second has only one of the two. The SVG that is mentioned in the error message is only in the first import. |
|