Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14176

Preview openoffice document doesn't work on tomcat

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8.4.4, 9.7, 10.9
    • Fix Version/s: None
    • Component/s: Office
    • Environment:
      * apache-tomcat-8.5.11
      * jdk1.8.0_121
      * webapp on /home/applis/xwiki
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Hello,

      Preview openoffice document doesn't work on tomcat server (apache-tomcat-8.5.11 and jdk1.8.0_121),
      On same server, I tested with jetty package (working well) and tomcat.(failed)
      The preview page doesn't displayed jpg file Pres-slidexx.jpg (generated by LibreOffice server) because a 503 error.

      After many tests I launched a strace on:

      • and jetty: (the webapps: /home/xxxx/xwiki-enterprise-jetty-hsqldb-8.4.4/webapps/xwiki)
        http://localhost:8080/xwiki/tmp/officeviewer/document%3Axwiki%3ASandbox.test1.WebHome/0/Pres-slide1.jpg
        3911  stat("/home/xxxx/xwiki/tmp/jetty-0.0.0.0-8080-xwiki-_xwiki-any-5432034322773776123.dir/xwiki-temp/tmp/officeviewer/xwiki/Sandbox/test1/WebHome/0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
        3911  open("/home/xxxx/xwiki/tmp/jetty-0.0.0.0-8080-xwiki-_xwiki-any-5432034322773776123.dir/xwiki-temp/tmp/officeviewer/xwiki/Sandbox/test1/WebHome/0/Pres-slide1.jpg", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 635
        3911  fstat(635, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
        3911  write(635, "\377\330\377\340\0\20JFIF\0\1\1\0\0\1\0\1\0\0\377\333\0C\0\10\6\6\7\6\5\10"..., 4096) = 4096
        

      On tomcat server it seem the path of jpg is wrong:
      <webapps>/xwiki/tmp/officeviewer/document/ .....jpg

      Note, on Tomcat the correct path (where jpg are created) is:
      <workdir_tomcat>/ROOT/xwiki-temp/tmp/officeviewer/xwiki/BacASable/WebHome/0/Pres-slide0.jpg

      Thxs

      Pascal B

        Attachments

          Activity

            People

            • Assignee:
              surli Simon Urli
              Reporter:
              Pbas Pascal BASTIEN
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: