Dear all,
your help would be appreciated with this issue:
I have problems with the preview of certain MS Word documents on Alfresco (5.0.d on OSx Server) rendering by the (headless) Libreoffice process (4.2).
This does not seem to be related to file type as such (doc vs. docx) but seems to happen with documents that contain images.
The same documents opened with libreoffice from the alfresco install on the same machine via desktop renders and saves correctly as PDF.
I have not systematically explored all image types but exchange of image from jpeg to PNG triggers this behaviour.
The exception appears in the Alfresco log below:
Many thanks
Prickly
017-03-12 16:36:26,428 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-23] Exception from executeScript - redirecting to status template error: 02120022 Wrapped Exception (with status template): 02120169 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 02120161 Unsupported transformation: application/msword to application/pdf
org.springframework.extensions.webscripts.WebScriptException: 02120022 Wrapped Exception (with status template): 02120169 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 02120161 Unsupported transformation: application/msword to application/pdf
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1127)
at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:195)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:482)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:551)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:619)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:399)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:280)
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.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:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
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:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.alfresco.scripts.ScriptException: 02120169 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 02120161 Unsupported transformation: application/msword to application/pdf
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:204)
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:1364)
at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:139)
... 33 more
Caused by: org.alfresco.repo.content.transform.UnsupportedTransformationException: 02120161 Unsupported transformation: application/msword to application/pdf
at org.alfresco.repo.content.transform.FailoverContentTransformer.transformInternal(FailoverContentTransformer.java:194)
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:250)
at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:486)
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:250)
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:353)
at org.alfresco.repo.content.ContentServiceImpl.failoverTransformers(ContentServiceImpl.java:686)
at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:635)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
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:129)
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$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy38.transform(Unknown Source)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable$1.doWork(AbstractTransformationRenderingEngine.java:439)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable$1.doWork(AbstractTransformationRenderingEngine.java:430)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable.call(AbstractTransformationRenderingEngine.java:429)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable.call(AbstractTransformationRenderingEngine.java:404)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Try this. Go to http://localhost:8080/alfresco/s/mimetypes. That returns a list of all the mimetypes that Alfresco knows about.
For example, you can go to http://localhost:8080/alfresco/s/mimetypes?mimetype=application/msword#application/msword to see what it knows about msword such as what it can be transformed to.
Or you can go the other way and look at PDF and see what it can be transformed from.
Also, did you manually set the mimetype to application/msword or is that what Alfresco set it to? Sometimes people inadvertently set it to application/msword when what it should really be set to is application/vnd.openxmlformats-officedocument.wordprocessingml.document.
The transformations are standard (unchanged by me) and all of the image / doc types seem to be there.
I have been able to come up with a minimal document to result in odd rendering behaviour by pasting a jpeg, pdf, and png image into a empty word document. This will results in the document being rendered - however only the first page (no scrolling to other pages).
This is somewhat different from the original problem where documents would not render at all (and error message).
This behaviour appears to be the same on an Alfresco 5.0d install on a OSx Server and 5.2 on Ubuntu LTS.
Importantly all documents open, display, and export perfect PDF files from the OsX Desktop (i.e. same executable but with out headless etc, start.
Ubuntu is running command line only so could not check.
To me this suggests a difference in between those two types of execution.
However, testing conversion (I assume this is similar to the call Alfresco would make) via the command line also produces the correct pdf.
$ soffice --nofirststartwizard --nologo --headless --convert-to pdf word.docx
Many thanks
Can you attach your test document? I'll see what happens in my 5.0.d install on Mac OS X.
I am still trying to create the ‘minimal' version of a file that does not render at all - the documents are complex multipage laboratory methods using different image formats and tables.
There are a fair number of these created from the same template - transfer of most of the text and images (with some initial tables deleted) creates the problem below.
Specifically, there is a similar situation where the pdf rendering seems to stop after the first page, i.e. only one page is shown in the previewer.
The minimal version to create this problem appears to be to start with an empty document and then to add images (I used the same screenshot) in three formats, one per page.
The same images added 3x in the same format work as normal.
Intriguingly adding some text in front of the images as in the ‘fixed’ file resolves the problem and deleting the text does not re-create the problem.
This has occurred on Community 5.0d and Community - 5.2.0 (r135134-b14)
Many thanks
Are you sure your problem is not related with the documents' size?
Have you tried to increase the transformation limits?
Here you can see some examples of what I am talking about: https://github.com/loftuxab/alfresco-ubuntu-install/blob/master/tomcat/alfresco-global.properties#L2...
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.