cancel
Showing results for 
Search instead for 
Did you mean: 

Document preview broken in 4.2.b?

ttownsend
Champ on-the-rise
Champ on-the-rise
Hi all,

I have a new 4.2.b/Ubuntu 12.04 install up and running, and have successfully migrated my previous 4.0.e db and alf_data to it.

However, whenever I select a document from the Document Library it does not display.  Per-MS filetype, here is what I see:
1.  The symbol from a broken image link in a frame (which happens for .pptx, .docx, .xlsx); or
2.  The words "This document can't be previewed.  Click here to download it." (which happens for .ppt, .doc, .xls)

I did notice that for one specific .xlsx file (edited in Google Docs), a single, but incorrectly formatted, page will display in the previewer and there are no previewer buttons/options to maximize the preview.  I've only found this single file that causes this behaviour.

I've reviewed by catalina.out and alfresco.log, but I didn't find anything indicating errors here.

I'm suspicious that this has something to do with OpenOffice or LibreOffice, and since (I think) LibreOffice integration is new in 4.2.b, could it be something here?


Cheers.

-EDIT-
This error appeared in alfresco.log when trying to preview a .docx file, but no error occurs in alfresco.log when trying to preview a .doc file, however the preview does not work.

16:30:08,392 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 10020021 The content node was not specified so the content cannot be streamed to the client: classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js
org.springframework.extensions.webscripts.WebScriptException: 10020021 The content node was not specified so the content cannot be streamed to the client: classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js
        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:433)
        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:345)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
        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:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1771)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

This error appeared in alfresco.log when trying to preview a .pptx file, but no error occurs in alfresco.log when trying to preview a .ppt file, however the preview does not work.

16:17:33,044 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 10020019 Wrapped Exception (with status template): 10023686 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 10023685 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/9/16/22/57/e5cc21c4-d686-4c7d-8045-ae998cba812e.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=1207212, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2012/11/2/16/17/28bd349d-d8c7-47d1-8f9c-d2ffedabbc35.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/bc1df468-5aef-42a1-8b04-d74dd97d85fd, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=960, height=960, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=1, readLimitTimeMs=-1}
org.springframework.extensions.webscripts.WebScriptException: 10020019 Wrapped Exception (with status template): 10023686 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 10023685 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/9/16/22/57/e5cc21c4-d686-4c7d-8045-ae998cba812e.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=1207212, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2012/11/2/16/17/28bd349d-d8c7-47d1-8f9c-d2ffedabbc35.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/bc1df468-5aef-42a1-8b04-d74dd97d85fd, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=960, height=960, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=1, readLimitTimeMs=-1}
        at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
        at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:212)
        at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:429)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
        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:345)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
        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:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: org.alfresco.scripts.ScriptException: 10023686 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 10023685 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/9/16/22/57/e5cc21c4-d686-4c7d-8045-ae998cba812e.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=1207212, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2012/11/2/16/17/28bd349d-d8c7-47d1-8f9c-d2ffedabbc35.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/bc1df468-5aef-42a1-8b04-d74dd97d85fd, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=960, height=960, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=1, readLimitTimeMs=-1}
        at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:202)
        at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
        at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
        at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
        at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1305)
        at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:156)
        … 28 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 10023685 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/9/16/22/57/e5cc21c4-d686-4c7d-8045-ae998cba812e.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=1207212, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2012/11/2/16/17/28bd349d-d8c7-47d1-8f9c-d2ffedabbc35.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/bc1df468-5aef-42a1-8b04-d74dd97d85fd, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=960, height=960, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=1, readLimitTimeMs=-1}
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)
        at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:625)
        at sun.reflect.GeneratedMethodAccessor984.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:125)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy56.transform(Unknown Source)
        at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine.render(AbstractTransformationRenderingEngine.java:126)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeRenditionImpl(AbstractRenderingEngine.java:501)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:425)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:408)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:407)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:369)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:242)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:822)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:723)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:557)
        at sun.reflect.GeneratedMethodAccessor866.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy42.executeAction(Unknown Source)
        at org.alfresco.repo.rendition.RenditionServiceImpl.executeRenditionAction(RenditionServiceImpl.java:336)
        at org.alfresco.repo.rendition.RenditionServiceImpl.render(RenditionServiceImpl.java:199)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:591)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.access$000(ThumbnailServiceImpl.java:67)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:265)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:262)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:261)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy123.createThumbnail(Unknown Source)
        at org.alfresco.repo.jscript.ScriptNode.createThumbnail(ScriptNode.java:2835)
        at sun.reflect.GeneratedMethodAccessor823.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
        at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
        at org.mozilla.javascript.gen.c15._c1(file:/opt/alfresco-4.2.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js:80)
        at org.mozilla.javascript.gen.c15.call(file:/opt/alfresco-4.2.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
        at org.mozilla.javascript.gen.c15._c0(file:/opt/alfresco-4.2.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js:121)
        at org.mozilla.javascript.gen.c15.call(file:/opt/alfresco-4.2.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
        at org.mozilla.javascript.gen.c15.call(file:/opt/alfresco-4.2.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
        at org.mozilla.javascript.gen.c15.exec(file:/opt/alfresco-4.2.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
        at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:492)
        at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:198)
        … 33 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 10023684 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/9/16/22/57/e5cc21c4-d686-4c7d-8045-ae998cba812e.bin, mimetype=application/vnd.openxmlformats-officedocument.presentationml.presentation, size=1207212, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store:///opt/alfresco-4.2.b/tomcat/temp/Alfresco/ComplextTransformer_intermediate_pptx_7509794370578414446.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]
   options: {targetContentProperty=null, contentReaderNodeRef=workspace://SpacesStore/bc1df468-5aef-42a1-8b04-d74dd97d85fd, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=960, height=960, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=1, readLimitTimeMs=-1}
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)
        at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:625)
        at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:477)
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)
        … 123 more
Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an error occurs while saving the package : null
        at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:479)
        at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1414)
        at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1401)
        at org.apache.poi.openxml4j.opc.ZipPackage.closeImpl(ZipPackage.java:328)
        at org.apache.poi.openxml4j.opc.OPCPackage.close(OPCPackage.java:417)
        at org.alfresco.repo.content.transform.OOXMLThumbnailContentTransformer.transformInternal(OOXMLThumbnailContentTransformer.java:123)
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:238)
        … 126 more
Caused by: java.lang.NullPointerException
        at org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller.marshall(ZipPackagePropertiesMarshaller.java:46)
        at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:423)
        … 132 more

I'm officially stumped.
17 REPLIES 17

ttownsend
Champ on-the-rise
Champ on-the-rise
I solved it.

It seems that there needed to be some basic configuration changes made to the 4.2.x releases relating to the use of libreoffice.

The following all happened on dark and stormy night in an Alfresco 4.2.b/Ubuntu 12.04_64 server environment.

I could not find openoffice/libreoffice in 'top' or 'service –status-all' so I learned that openoffice server wasn't running.
So I looked in alfresco-4.2.b/alfresco.sh and found the entry for starting openoffice, which is OPENOFFICE_SCRIPT=$INSTALLDIR/libreoffice/scripts/ctl.sh
But since there is no file of this name (ctl.sh); it really refers to openoffice_ctl.sh, so I changed ctl.sh to openoffice_ctl.sh
Then I looked in alfresco-4.2.b/libreoffice/scripts and found openoffice_ctl.sh and did './openoffice_stl.sh status', which returned "open office not running".

Doing
'./alfresco.sh restart'
returned a
openoffice did not start
, so I found this link:  http://wiki.alfresco.com/wiki/Running_OpenOffice_From_Terminal

From that link, I did
./soffice -nofirststartwizard -nologo -headless -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager
, which returned this:

/opt/alfresco-4.2.b/libreoffice/program/soffice.bin: error while loading shared libraries: libxineramag.so.1: cannot open shared object file: No such file or directory
No command 'urp' found, did you mean:
Command 'arp' from package 'net-tools' (main)
Command 'burp' from package 'burp' (universe)
Command 'rup' from package 'rstat-client' (universe)
Command 'unp' from package 'unp' (universe)
urp: command not found
StarOffice.ServiceManager: command not found

So I went hunting for the missing shared library libxinerama.so.1

Further reading found a handy linux utility in Ubuntu called 'apt-file'.
When used as 'apt-file search <name of missing shared library>' returns the package that I needed to install to get that library.

I got it and used it to find the missing libraries, one-by-one.

apt-get install apt-file
apt-file update
apt-file search "missing library name"
'apt-file search "missing library name"' returns the package name that includes the missing shared library, which in my case were these:

Missing Library:        ->      Package Name:
libxinerama.so.1        ->      libxinerama1
libfontconfig.so.1      ->      libfontconfig1
libXrender.so.1         ->      libxrender1
libSM.so6               ->      libsm6

Note that doing './soffice -nofirststartwizard -nologo -headless -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager' will throw an error each time a shared library is missing, naming that library.

After this, I again did './alfresco.sh restart', which returned
tomcat started
openoffice started
postgresql started

I went to a test site I created and selected .doc/.docx, .ppt/pptx, and .xls/.xlsx files and EACH ONE PREVIEWED CORRECTLY.

Since I kept notes on this as I went along I wrote up this post, took a snapshot of my VM, and had a beer.  Okay, two beers.

Life is good - I hope this can help anyone with the same problem.

Cheers!

reva_12
Champ in-the-making
Champ in-the-making
I just got StarOffice.ServiceManager - command not found, without any details on missing shared library.
Any other problem that you see?

benlawrence
Champ in-the-making
Champ in-the-making
Really appreciate your post. Fixed the problem ok. Many thanks!

davik5
Champ in-the-making
Champ in-the-making
Thanks for the fix, now the preview is working.
But this solution introduced another problem, the sboffice.bin process takes 99% of CPU costantly.

4220 root      20   0  483m  46m  30m S    99  1.2   1:27.86 soffice.bin                                                                                                      
4124 root      20   0 3421m 1.0g  30m S   17  26.7   2:29.52 java                                                                                                                
4165 postgres  20   0 59684  30m  25m S    3  0.8   0:09.90 postgres   

Investigating about this problem, I have noticed that the sboffice.bin process start more than once.
One process is started by java process and the other one is started by the ./libreoffice/scripts/openoffice_ctl.sh script.

$ pstree -a
init
  |-acpid -c /etc/acpi/events -s /var/run/acpid.socket
  |-atd
  |-cron
  |-dbus-daemon –system –fork –activation=upstart
  |-getty -8 38400 tty4
  |-getty -8 38400 tty5
  |-getty -8 38400 tty2
  |-getty -8 38400 tty3
  |-getty -8 38400 tty6
  |-getty -8 38400 tty1
  |-irqbalance
  |-java -Djava.util.logging.config.file=/opt/alfresco-4.2.b/tomcat/conf/logging.properties -XX:MaxPermSize=512m -Xms128m -Xmx1024m-XX:-DisableExplicitG
  |   |-soffice.bin –accept=socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager-env:UserInstallation=file:///opt/alfresco-4.2.b/alf_da
  |   |   `-3*[{soffice.bin}]
  |   `-128*[{java}]
  |-postgres -D /opt/alfresco-4.2.b/alf_data/postgresql
  |   |-postgres                                                          
  |   |-postgres                                                      
  |   |-postgres                                             
  |   |-postgres                                                 
  |   |-postgres                                    
  |   |-postgres                                    
  |   |-postgres                                    
  |   |-postgres                                    
  |   |-postgres                                    
  |   |-postgres                                    
  |   |-postgres                                    
  |   |-postgres                                    
  |   `-postgres                                    
  |-rsyslogd -c5
  |   `-3*[{rsyslogd}]
  |-soffice.bin –nofirststartwizard –nologo –headless –accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager
  |   `-5*[{soffice.bin}]


To solve this problem I commented out the line in the script alfresco.sh that starts the sboffice process:
#OPENOFFICE_SCRIPT=$INSTALLDIR/libreoffice/scripts/openoffice_ctl.sh
and restarted Alfresco:
$ sudo service alfresco restart

Now the CPU utilization is coming back to normality, and only one process of sboffice is started under Java.
I think we have to satisfy the dependencies of the various packages to activate the sboffice, but do not enable the startup script sboffice.

Bye

michaelk
Champ in-the-making
Champ in-the-making
I get this after libreoffice tries to run…

terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'

I've installed all the required libraries. This is truely a 'headless' server (with no X display).

Does anyone have any clue as to what might be happening.  Googling suggests removing some files in ~/.openoffice or ~/.config but I don't have these directories.

profmikebroyles
Champ in-the-making
Champ in-the-making
For anyone running Alfresco 4.2.c and CentOS / RHEL 6.x:

- correct line 23 of alfresco.sh (as already indicated above)
- 'yum install' the following packages:  libX11, fontconfig, libpng, libXrender, libXext, libSM

Then you can either restart alfresco entirely, or try to kick off the script manually (assuming you took the default install path):

]# /opt/alfresco-4.2.c/libreoffice/scripts/openoffice_ctl.sh start

Check to see if it's running:

]# netstat -tupln | grep office

My installation of 4.2.c on CentOS 6 worked perfectly with msoffice docs, but not with the MS Outlook file (.msg). Posted here: http://forums.alfresco.com/forum/end-user-discussions/alfresco-share/unable-preview-outlook-message-...

Anyone got the similar issue?

bch_firas
Champ in-the-making
Champ in-the-making
thanks for the solution it really helped me

flheide
Champ in-the-making
Champ in-the-making
From Alfresco 4.2 onwards, LibreOffice requires the following libraries to be installed on your system:

    libfontconfig.so
    libSM.so
    libICE.so
    libXrender.so
    libXext.so



http://docs.alfresco.com/community/index.jsp?topic=%2Fcom.alfresco.community.doc%2Fconcepts%2Finstal...