Hi,
I have eml file https://file.io/7YmW2sYX2NpA with content type "multipart/mixed" (two attachements). I would like to generate preview for this file, but following error occure:
2021-05-14 14:06:07,588 ERROR [org.alfresco.repo.web.scripts.RepositoryContainer] [http-nio-8080-exec-2] Server error (041429863) org.springframework.extensions.webscripts.WebScriptException: 04140038 Wrapped Exception (with status template): 041429862 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 041429861 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2021/5/14/14/6/3ae18f54-226a-440e-b0fd-6c58ac0b74b2.bin, mimetype=message/rfc822, size=3, encoding=UTF-8, locale=cs] writer: ContentAccessor[ contentUrl=store://2021/5/14/14/6/33db3379-31ab-4fbf-ab72-0af57ac90b4e.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US] options: {use=null, contentReaderNodeRef=workspace://SpacesStore/04deb55d-3a85-4e3e-a0db-f4b9a3f2f1b8, sourceContentProperty=null, contentWriterNodeRef=null, targetContentProperty=null, includeEmbedded=null} limits: {timeoutMs=120000, pageLimit=1} at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1139) at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:202) at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:595) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:664) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:435) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:315) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210) at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) at org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at jdk.internal.reflect.GeneratedMethodAccessor513.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:279) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:314) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:170) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:225) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:47) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:149) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at jdk.internal.reflect.GeneratedMethodAccessor483.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:279) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:314) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:191) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:47) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:149) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93) at jdk.internal.reflect.GeneratedMethodAccessor483.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:279) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:314) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:191) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:47) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:149) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68) at jdk.internal.reflect.GeneratedMethodAccessor483.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:279) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:314) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:191) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:47) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:149) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53) at jdk.internal.reflect.GeneratedMethodAccessor483.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:279) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:314) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:191) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:47) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:149) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.alfresco.scripts.ScriptException: 041429862 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 041429861 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2021/5/14/14/6/3ae18f54-226a-440e-b0fd-6c58ac0b74b2.bin, mimetype=message/rfc822, size=3, encoding=UTF-8, locale=cs] writer: ContentAccessor[ contentUrl=store://2021/5/14/14/6/33db3379-31ab-4fbf-ab72-0af57ac90b4e.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US] options: {use=null, contentReaderNodeRef=workspace://SpacesStore/04deb55d-3a85-4e3e-a0db-f4b9a3f2f1b8, sourceContentProperty=null, contentWriterNodeRef=null, targetContentProperty=null, includeEmbedded=null} limits: {timeoutMs=120000, pageLimit=1} at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:214) at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219) at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181) at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109) at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1376) at org.alfresco.repo.web.scripts.content.StreamContent.execute(StreamContent.java:146) ... 107 more Caused by: org.alfresco.service.cmr.repository.ContentIOException: 041429861 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2021/5/14/14/6/3ae18f54-226a-440e-b0fd-6c58ac0b74b2.bin, mimetype=message/rfc822, size=3, encoding=UTF-8, locale=cs] writer: ContentAccessor[ contentUrl=store://2021/5/14/14/6/33db3379-31ab-4fbf-ab72-0af57ac90b4e.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US] options: {use=null, contentReaderNodeRef=workspace://SpacesStore/04deb55d-3a85-4e3e-a0db-f4b9a3f2f1b8, sourceContentProperty=null, contentWriterNodeRef=null, targetContentProperty=null, includeEmbedded=null} limits: {timeoutMs=120000, pageLimit=1} at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:344) at org.alfresco.repo.rendition2.ContentTransformServiceImpl.transform(ContentTransformServiceImpl.java:134) at org.alfresco.repo.rendition2.LegacySynchronousTransformClient.transform(LegacySynchronousTransformClient.java:98) at org.alfresco.repo.rendition2.SwitchingSynchronousTransformClient.transform(SwitchingSynchronousTransformClient.java:103) at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable$1.doWork(AbstractTransformationRenderingEngine.java:456) at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable$1.doWork(AbstractTransformationRenderingEngine.java:1) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:602) at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable.call(AbstractTransformationRenderingEngine.java:445) at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable.call(AbstractTransformationRenderingEngine.java:1) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ... 1 more Caused by: org.alfresco.service.cmr.repository.ContentIOException: 041429860 Content conversion failed: reader: ContentAccessor[ contentUrl=store:///usr/local/tomcat/temp/Alfresco/ComplextTransformer_intermediate_eml_14843093510070492055.txt, mimetype=text/plain, size=0, encoding=UTF-8, locale=en_US] writer: ContentAccessor[ contentUrl=store://2021/5/14/14/6/33db3379-31ab-4fbf-ab72-0af57ac90b4e.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US] options: {use=null, contentReaderNodeRef=null, sourceContentProperty=null, contentWriterNodeRef=null, targetContentProperty=null, includeEmbedded=null} limits: {timeoutMs=120000, maxSourceSizeKBytes=5120, pageLimit=1} at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:344) at org.alfresco.repo.rendition2.ContentTransformServiceImpl.transform(ContentTransformServiceImpl.java:134) at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:476) at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:266) ... 12 more Caused by: java.lang.IllegalStateException: Cannot read while there is an open stream writer at org.apache.pdfbox.cos.COSStream.createRawInputStream(COSStream.java:207) at org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:1219) at org.apache.pdfbox.cos.COSStream.accept(COSStream.java:475) at org.apache.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:526) at org.apache.pdfbox.pdfwriter.COSWriter.doWriteObjects(COSWriter.java:464) at org.apache.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:448) at org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1113) at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:452) at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1386) at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1273) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1357) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1328) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1316) at org.alfresco.repo.content.transform.OOoContentTransformerHelper.produceEmptyPdfFile(OOoContentTransformerHelper.java:256) at org.alfresco.repo.content.transform.OOoContentTransformerHelper.transform(OOoContentTransformerHelper.java:366) at jdk.internal.reflect.GeneratedMethodAccessor1562.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:79) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy39.transform(Unknown Source) at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:110) at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:266) ... 15 more
Any idea how to fix it?
Thank you.
it may not be supported ootb. You may have to develop custom transformer.
You can check the supported types by accessing this URL: ACS_HOST/alfresco/service/mimetypes (http://localhost:8080/alfresco/service/mimetypes)
Go through this documentation to learn more and how to create custom transformer:
https://hub.alfresco.com/t5/alfresco-content-services-hub/content-transformations/ba-p/291567
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.