无法在露天中使用扩展名doc,ppt预览文档

时间:2015-11-10 12:44:53

标签: liferay-6 alfresco alfresco-share

在露天共享中预览文档时遇到问题。 Pdf和图像文件成功预览。 但是docx和pptx文件的问题......无法在露天共享中预览.. 得到以下错误

Alfresco    Web Script Status 500 - Internal Error

The Web Script /alfresco/wcs/api/node/workspace/SpacesStore/39ca1cfb-58ae-49e7-8ef9-9a3bcd0f27bb/content/thumbnails/webpreview has responded with a status of 500 - Internal Error.

500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:    10100005 Wrapped Exception (with status template): 10100103 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 10100102 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2015/11/10/13/15/df0306de-c378-48f6-9815-66966bb9c8dc.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=306210, encoding=UTF-8, locale=en_US] writer: ContentAccessor[ contentUrl=store://2015/11/10/13/20/d6055d8b-48ae-432a-8658-b9b16afd862e.bin, mimetype=application/x-shockwave-flash, size=0, encoding=UTF-8, locale=en_US] options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/39ca1cfb-58ae-49e7-8ef9-9a3bcd0f27bb, contentWriterNodeRef=workspace://SpacesStore/08ecd5ae-58b7-439a-8450-7db3e1ba45c5, sourceContentProperty=null, use=webpreview, includeEmbedded=false} limits: {maxSourceSizeKBytes=4096}

我还检查了日志文件.. 在日志文件中,我收到了以下错误

     ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-12] Exception from executeScript - redirecting to status template error: 10100003 Wrapped Exception (with status template): 10100091 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 10100090 Content conversion failed: 
   reader: ContentAccessor[ contentUrl=store://2015/11/10/13/15/df0306de-c378-48f6-9815-66966bb9c8dc.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=306210, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2015/11/10/13/18/3e665fd1-1789-43c9-92a0-6d30ff2a1b87.bin, mimetype=application/x-shockwave-flash, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/39ca1cfb-58ae-49e7-8ef9-9a3bcd0f27bb, contentWriterNodeRef=workspace://SpacesStore/0b38853c-3e2a-4526-91bc-22f852c38506, sourceContentProperty=null, use=webpreview, includeEmbedded=false}
   limits: {maxSourceSizeKBytes=4096}
 org.springframework.extensions.webscripts.WebScriptException: 10100003 Wrapped Exception (with status template): 10100091 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 10100090 Content conversion failed: 
   reader: ContentAccessor[ contentUrl=store://2015/11/10/13/15/df0306de-c378-48f6-9815-66966bb9c8dc.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=306210, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2015/11/10/13/18/3e665fd1-1789-43c9-92a0-6d30ff2a1b87.bin, mimetype=application/x-shockwave-flash, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/39ca1cfb-58ae-49e7-8ef9-9a3bcd0f27bb, contentWriterNodeRef=workspace://SpacesStore/0b38853c-3e2a-4526-91bc-22f852c38506, sourceContentProperty=null, use=webpreview, includeEmbedded=false}
   limits: {maxSourceSizeKBytes=4096}
    at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
    at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:184)
    at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:429)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:341)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
    at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
    at sun.reflect.GeneratedMethodAccessor509.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:125)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy329.doFilter(Unknown Source)
    at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.alfresco.web.app.servlet.WebScriptSSOAuthenticationFilter.doFilter(WebScriptSSOAuthenticationFilter.java:114)
    at sun.reflect.GeneratedMethodAccessor509.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:112)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy329.doFilter(Unknown Source)
    at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.alfresco.web.app.servlet.WebscriptCookieAuthenticationFilter.doFilter(WebscriptCookieAuthenticationFilter.java:61)
    at sun.reflect.GeneratedMethodAccessor509.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:125)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy329.doFilter(Unknown Source)
    at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
    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:724)

openoffice错误

  from file: /opt/alfresco-4.2.f/tomcat/temp/Alfresco/OpenOfficeContentTransformer-source-2887837723322448158.doc
   to file: /opt/alfresco-4.2.f/tomcat/temp/Alfresco/OpenOfficeContentTransformer-target-996640461019588441.pdf
    at org.alfresco.repo.content.transform.OOoContentTransformerHelper.transform(OOoContentTransformerHelper.java:372)
    at sun.reflect.GeneratedMethodAccessor850.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy15.transform(Unknown Source)
    at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:98)
    at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:211)
    ... 35 more
Caused by: net.sf.jooreports.openoffice.connection.OpenOfficeException: conversion failed; java.lang.reflect.UndeclaredThrowableException
    at net.sf.jooreports.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:117)
    at net.sf.jooreports.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:88)
    at org.alfresco.repo.content.transform.OpenOfficeContentTransformerWorker.convert(OpenOfficeContentTransformerWorker.java:118)
    at org.alfresco.repo.content.transform.OOoContentTransformerHelper.transform(OOoContentTransformerHelper.java:368)

alfresco-global.properties

ooo.exe=/usr/lib/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/opt/alfresco-4.2.f/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=/opt/alfresco-4.2.f/common/bin/pdf2swf
swf.languagedir=/opt/alfresco-4.2.f/common/japanese
img.gslib=${img.root}/share/ghostscript/8.56/lib

jodconverter.enabled=true
jodconverter.officeHome=/usr/lib/libreoffice
jodconverter.portNumbers=8100

我正在使用alfresco 4.2.f

我该如何解决这个问题 请帮忙 谢谢

3 个答案:

答案 0 :(得分:1)

您是否触摸过Transformer配置? 通过限制office doc max sizes,Alfresco或多或少具有无意义的默认配置。在你的堆栈跟踪中,我看到最多8 MB

您需要通过将transformers.properties和transformers-context.xml复制到tomcat / shared / classes / alfresco / extension / subsystems / Transformers / default / default来覆盖转换器配置,并根据需要更改值。 e.g。

e7d6c19f8dd8

btw:社区版中不再提供jodconverter,因此您可以从alfresco-global.properties中删除参数

答案 1 :(得分:1)

Make sure you have installed the necesarry dependency libs in your OS (and in correct 32 or 64 bit version) http://docs.alfresco.com/5.0/concepts/install-lolibfiles.html :

  1. centos

yum install libXrender libSM libICE libXext fontconfig cups-libs dbus-glib.x86_64 libXt.x86_64

  1. ubuntu

apt-get install libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2

答案 2 :(得分:0)

您可以尝试进行以下更改(假设alfresco安装在/opt/alfresco-4.2.f中):

vi /opt/alfresco-4.2.f/alfresco.sh: => LIBREOFFICE_SCRIPT = $ INSTALLDIR / LibreOffice的/脚本/的 libreoffice_ctl.sh

vi /opt/alfresco-4.2.f/libreoffice/program/sofficerc =>将徽标= 1更改为徽标= 0