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

Office viewer fails in some installations for word documents with an accent in the name

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      In some circumstances (don't know exactly which ones), on some servers, calling

      {{office attachment="Tést Two.docx" filterStyles="false"/}}
      

      for the attached office file results in this exception

      org.xwiki.rendering.macro.MacroExecutionException: Failed to view office attachment.
        at org.xwiki.rendering.internal.macro.office.OfficeMacro.execute(OfficeMacro.java:114)
        at org.xwiki.rendering.internal.macro.office.OfficeMacro.execute(OfficeMacro.java:55)
        at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:252)
        at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
        at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:94)
        at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:252)
        at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:125)
        at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:55)
        at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
        at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
        at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:113)
        at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:50)
        at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:67)
        at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:41)
        at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1104)
        at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1082)
        at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1114)
        at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:674)
        at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
        at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
        at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.xwiki.velocity.introspection.TryCatchDirective.render(TryCatchDirective.java:72)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:256)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:198)
        at com.xpn.xwiki.internal.template.TemplateManager.evaluateContent(TemplateManager.java:674)
        at com.xpn.xwiki.internal.template.TemplateManager.render(TemplateManager.java:574)
        at com.xpn.xwiki.internal.template.TemplateManager.renderFromSkin(TemplateManager.java:555)
        at com.xpn.xwiki.internal.template.TemplateManager.renderFromSkin(TemplateManager.java:526)
        at com.xpn.xwiki.internal.template.TemplateManager.render(TemplateManager.java:512)
        at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1738)
        at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1718)
        at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:801)
        at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:256)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:198)
        at com.xpn.xwiki.internal.template.TemplateManager.evaluateContent(TemplateManager.java:674)
        at com.xpn.xwiki.internal.template.TemplateManager.render(TemplateManager.java:574)
        at com.xpn.xwiki.internal.template.TemplateManager.renderFromSkin(TemplateManager.java:555)
        at com.xpn.xwiki.internal.template.TemplateManager.renderFromSkin(TemplateManager.java:526)
        at com.xpn.xwiki.internal.template.TemplateManager.render(TemplateManager.java:512)
        at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1738)
        at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:184)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:355)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:146)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:127)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
        at sun.reflect.GeneratedMethodAccessor184.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at net.bull.javamelody.JspWrapper.invoke(JspWrapper.java:150)
        at net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:285)
        at com.sun.proxy.$Proxy56.forward(Unknown Source)
        at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
      Caused by: org.xwiki.officeimporter.OfficeImporterException: Error while converting document [Tést Two.docx] into html.
        at org.xwiki.officeimporter.internal.builder.DefaultXHTMLOfficeDocumentBuilder.build(DefaultXHTMLOfficeDocumentBuilder.java:97)
        at org.xwiki.officeimporter.internal.builder.DefaultXDOMOfficeDocumentBuilder.build(DefaultXDOMOfficeDocumentBuilder.java:84)
        at org.xwiki.office.viewer.internal.DefaultOfficeResourceViewer.createXDOM(DefaultOfficeResourceViewer.java:273)
        at org.xwiki.office.viewer.internal.DefaultOfficeResourceViewer.createXDOM(DefaultOfficeResourceViewer.java:245)
        at org.xwiki.office.viewer.internal.DefaultOfficeResourceViewer.getView(DefaultOfficeResourceViewer.java:341)
        at org.xwiki.office.viewer.internal.DefaultOfficeResourceViewer.createView(DefaultOfficeResourceViewer.java:395)
        at org.xwiki.rendering.internal.macro.office.OfficeMacro.execute(OfficeMacro.java:112)
        ... 146 more
      Caused by: org.xwiki.officeimporter.converter.OfficeConverterException: Error while performing conversion.
        at org.xwiki.officeimporter.internal.converter.DefaultOfficeConverter.convert(DefaultOfficeConverter.java:116)
        at org.xwiki.officeimporter.internal.builder.DefaultXHTMLOfficeDocumentBuilder.build(DefaultXHTMLOfficeDocumentBuilder.java:94)
        ... 152 more
      Caused by: org.artofsolving.jodconverter.office.OfficeException: could not load document: Tést Two.docx
        at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:92)
        at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:59)
        at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:80)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        ... 3 more
      Caused by: com.sun.star.lang.IllegalArgumentException: Unsupported URL <file:///usr/local/apache-tomcat-7.0.42/work/Catalina/localhost/_/xwiki-temp/df383a78-5301-443f-8652-f4a97b3fada9/input/Tést%20Two.docx>
        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.$Proxy79.loadComponentFromURL(Unknown Source)
        at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:90)
        ... 7 more
      

      Note that the same file, without the accent in the name works properly.

      I managed to reproduce it on some servers running XWiki 6.4.8 and 5.4.6, with both office servers 3.6 and 4.1 (libre office).
      On other servers it works fine, including a local install of XWiki 6.4.8 with libreoffice 3.6.
      I also managed to reproduce the same scenario (documents with accents fail but without accents work) on a 8.4.4 as well, but with a different exception.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h