Office import fails with type detection failed

Hi,
when I try to import an office document it fails with:

Caused by: com.sun.star.lang.IllegalArgumentException: Unsupported URL <file:///var/cache/tomcat9/work/Catalina/localhost/xwiki/xwiki-temp/afcdf744-5a59-4983-95d5-6a29515a98fb/input/testfile.ods>: “type detection failed” /home/buildslave/source/libo-core/framework/source/loadenv/loadenv.cxx:190
at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
at com.sun.proxy.$Proxy78.loadComponentFromURL(Unknown Source)
at org.jodconverter.task.AbstractLocalOfficeTask.loadDocument(AbstractLocalOfficeTask.java:104)
… 215 common frames omitte

I use Xwiki 11.10.10 and Libreoffice 7.0, connect as seperate process via ‘openoffice.serverType=1’

Hi,

Note that officially we don’t support LibreOffice 7.0 yet, per our support strategy we support the LTS version of LibreOffice, see: https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/LibreOfficeSupportStrategy/

Now the error you get sounds like something not directly related to XWiki but maybe related to the library we use for supporting LibreOffice, jodconverter: https://github.com/sbraconnier/jodconverter

That might be something to check on their side. Best would be to post a bug report with the full strack trace to them, you can post back the link here for the follow up.

I have create an report for it:

After days of testing now it works. There was two problems on the system.
First you need all components of LibreOfiice(cal, writer etc). If some is missing then no error about the missing component is logged. Only the error message like in the thred start is logged.
And the second, problem was, that tomcat and the libreoffice server must run as the same user, because the file transfer from and to the officeserver will be done via the tomcat cache directory instant of the os one.

Glad you found the problem. Thanks for posting, this could be useful to others in the future. Feel free to create an account and edit pages on xwiki.org to improve them.

Thanks