Error while trying the FileStreamConverter operation

Hi there … I am trying this FileStreamConverter operation on an Xwiki instance that i installed on a Linux Centos server as a Docker container with Tomcat and PostGres. This is to migrate an existing Confluence space zip into Xwiki.
My installed extension versions are Confluence XML : 9.4.1 and Filter Streams Converter Application : 11.4. If i try to install the latest version of Filter Streams Converter (12.4?) it throws error that “it is incompatible with the current version”.
Anyway the file is located on the server where Xwiki (is installed as Docker) and the path i gave in the source is : “file:/usr/mnt/Confluence-space-export-RSD-xml.zip”. Which ever directory i try, it gives the same ‘File Not Found error’ as below.

Caused by: class java.io.FileNotFoundException: /mnt/nas/Confluence-space-export-RSD.xml.zip (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.(FileInputStream.java:157)

My POC’s success is hinging on this one operation :slight_smile:

Thanks for your help!
Srikanth

Since you use Docker you need to understand how Docker works… It’s a container and it isolates you from your host, that’s its purpose…

So you need to mount your volume using for example -v. See the docker documentation at Bind mounts | Docker Docs

That’s probably because you’re using an older xwiki version. What version are you using?

Thank you for the direction on Docker Mounting. I read about it and i was able to point to the right path the docker. I had used this command to run my Docker :

docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /my/path/xwiki:/usr/local/xwiki -e DB_USER=xwiki -e DB_PASSWORD=xwiki -e DB_DATABASE=xwiki -e DB_HOST=postgres-xwiki xwiki:lts-postgres-tomcat

So now the FileStreamConverter is able to find the file but it gives me a new error as below.

    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: class java.io.IOException: No space left on device
    at java.base/java.io.FileOutputStream.writeBytes(Native Method)
    at java.base/java.io.FileOutputStream.write(FileOutputStream.java:354)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2315)
    at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    at org.apache.commons.io.IOUtils.copy(IOUtils.java:2246)
    at org.apache.commons.io.FileUtils.copyToFile(FileUtils.java:1530)
    at org.apache.commons.io.FileUtils.copyInputStreamToFile(FileUtils.java:150

My zip file i am trying to migrate is around 2 GB and my Centos has 252 GB distributed as below. Which folder is this program looking for space ?

image

I m using [XWiki 11.10.10]

My guess is that this is the space inside the docker container. I think you need to check how much disk space you have there. Maybe check docker system df | Docker Docs

For me on mac, I have for ex:

thank you for the answer and sorry for the delay. Have been on vacation.
I set up the xwiki on a new Centos VM with more space (this time with 2 TB) … hopefully wont run out of space in the docker. But anyway when i tried the filter stream conversion operation … i get this error below. As always thanks for your help. I made sure the file is in the mount pointed to by the /usr/local/xwiki/ location. So it should have found the file… I am thinking but not sure. I am trying to understand what this error means.

> Failed to read Confluence package in file [/usr/local/xwiki/Confluence-space-export-RSD.xml.zip]

class org.xwiki.filter.FilterException: Failed to read package
at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:117)
at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:75)
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:243)
at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
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:834)
Caused by: class javax.xml.stream.XMLStreamException: Failed to read Confluence package in file [/usr/local/xwiki/Confluence-space-export-RSD.xml.zip]
at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.fromFile(ConfluenceXMLPackage.java:296)
at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.(ConfluenceXMLPackage.java:263)
at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:115)
at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:75)
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:243)
at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
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:834)
Finished job of type [filter.converter] with identifier [filter/converter/confluence+xml/xwiki+instance]

This is not the root cause of the error. Unfortunately the code isn’t good and is missing showing the root issue. I’ve just updated it for next time: [Misc] Show the real error in logs · xwiki-contrib/confluence@d23611e · GitHub

Note: I have no knowledge of this extension so can’t help your much. It seems to say that the file isn’t there or is not accessible. You should check that.

I’m just released 9.4.3 with the fix, it should give us more details regarding the problem you have.

Thank you. I tried with the latest extension and it did start the job but failed after some 30 seconds. This is the error now … please suggest.

/usr/local/tomcat/temp/confluencexml-tree3867335783950297095/objects/15287386/properties.properties (No such file or directory)
class org.xwiki.filter.FilterException: Failed to read package
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:117)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:75)
    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:243)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
    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:834)
Caused by: class org.apache.commons.configuration.ConfigurationException: Unable to save to file /usr/local/tomcat/temp/confluencexml-tree3867335783950297095/objects/15287386/properties.properties
    at org.apache.commons.configuration.DefaultFileSystem.getOutputStream(DefaultFileSystem.java:143)
    at org.apache.commons.configuration.DefaultFileSystem.getOutputStream(DefaultFileSystem.java:98)
    at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:473)
    at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:441)
    at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:418)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.saveObjectProperties(ConfluenceXMLPackage.java:1046)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.saveObjectProperties(ConfluenceXMLPackage.java:1036)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.readObject(ConfluenceXMLPackage.java:530)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.createTree(ConfluenceXMLPackage.java:492)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.<init>(ConfluenceXMLPackage.java:285)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:115)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:75)
    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:243)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
    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:834)
Caused by: class java.io.FileNotFoundException: /usr/local/tomcat/temp/confluencexml-tree3867335783950297095/objects/15287386/properties.properties (No such file or directory)
    at java.base/java.io.FileOutputStream.open0(Native Method)
    at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
    at org.apache.commons.configuration.DefaultFileSystem.getOutputStream(DefaultFileSystem.java:139)
    at org.apache.commons.configuration.DefaultFileSystem.getOutputStream(DefaultFileSystem.java:98)
    at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:473)
    at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:441)
    at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:418)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.saveObjectProperties(ConfluenceXMLPackage.java:1046)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.saveObjectProperties(ConfluenceXMLPackage.java:1036)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.readObject(ConfluenceXMLPackage.java:530)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.createTree(ConfluenceXMLPackage.java:492)
    at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.<init>(ConfluenceXMLPackage.java:285)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:115)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:75)
    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:243)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
    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:834)

Does the user running tomcat have the right to write in /usr/local/tomcat/temp/ ? Do you see any /usr/local/tomcat/temp/confluencexml-tree3867335783950297095 folder there ?