|
Description: |
The following exception is often seen (not 100%) while filtering confluence packages using the output instance filter twice . The attached package has a good reproduction rate.
Reproduction steps: * # Install the Filter Streams Converter extension * # Install the Confluence-XML extension * # Go to [ http://localhost:8080/xwiki/bin/view/Filter/ ] ** Input type: Confluence XML input filter stream (confluence+xml) *** source: the attached file ** Output type: XWiki instance output stream (xwiki+instance) # Run the migration # repeat 3 and 4.
This happens when the filter overwrites attachments that already exist.
{noformat} [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.xwiki.confluencepro.internal.DocumentInstanceOutputFilterStream.maybeSaveDocument(DocumentInstanceOutputFilterStream.java:252), at com.xwiki.confluencepro.internal.DocumentInstanceOutputFilterStream.endWikiDocumentRevision(DocumentInstanceOutputFilterStream.java:164), at jdk.internal.reflect.GeneratedMethodAccessor126.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.$Proxy235.endWikiDocumentRevision(Unknown Source), at jdk.internal.reflect.GeneratedMethodAccessor126.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.$Proxy236.endWikiDocumentRevision(Unknown Source), at jdk.internal.reflect.GeneratedMethodAccessor126.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.$Proxy237.endWikiDocumentRevision(Unknown Source), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:1353), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendRevisions(ConfluenceInputFilterStream.java:1211), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendTerminalDoc(ConfluenceInputFilterStream.java:1143), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:1111), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPage(ConfluenceInputFilterStream.java:460), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPages(ConfluenceInputFilterStream.java:497), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:1114), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPage(ConfluenceInputFilterStream.java:460), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPages(ConfluenceInputFilterStream.java:497), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:1114), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPage(ConfluenceInputFilterStream.java:460), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPages(ConfluenceInputFilterStream.java:497), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:1114), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPage(ConfluenceInputFilterStream.java:460), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPages(ConfluenceInputFilterStream.java:497), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:1114), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPage(ConfluenceInputFilterStream.java:460), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendPages(ConfluenceInputFilterStream.java:497), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.sendConfluenceRootSpace(ConfluenceInputFilterStream.java:436), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:346), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:184), at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:96), 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 com.xwiki.confluencepro.internal.ConfluenceMigrationJob.runInternal(ConfluenceMigrationJob.java:166), at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246), at org.xwiki.job.AbstractJob.run(AbstractJob.java:223), 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: java.io.FileNotFoundException: /var/lib/xwiki/data/store/file/xwiki/9/3/8e27905808f40e87e635782de034e5/attachments/2/f/986a55f22de5a5a7c24d75e3ac2257/fv1.2.pdf (No such file or directory), 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), ... 63 more]{noformat} See also [ https://github.com/xwikisas/application-confluence-migrator-pro/issues/88 ]
|
|