cancel
Showing results for 
Search instead for 
Did you mean: 

Exception on preview of txt files

nettania
Confirmed Champ
Confirmed Champ

Hi,

I have installed Alfresco 6.1.2 CE ond a W2019 server. Meanwhile the preview on other files is working perfectly, on certain txt files I am getting the information, that the pdf preview could not be displayed. In alfresco log the following exception is noted:

2019-07-11 15:53:28,076 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [http-nio-8080-exec-1] Starting 'Transformers' subsystem, ID: [Transformers, default]
2019-07-11 15:53:28,278 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [http-nio-8080-exec-1] Startup of 'Transformers' subsystem, ID: [Transformers, default] complete
2019-07-11 15:53:54,591 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-7] Exception from executeScript: 06110001 Wrapped Exception (with status template): 06110024 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 06110023 06110022 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/5a5c6197-3be5-4083-924c-20756ac06ef9
org.springframework.extensions.webscripts.WebScriptException: 06110001 Wrapped Exception (with status template): 06110024 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 06110023 06110022 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/5a5c6197-3be5-4083-924c-20756ac06ef9
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:512)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
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:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
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:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
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: 06110024 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 06110023 06110022 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/5a5c6197-3be5-4083-924c-20756ac06ef9
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:211)
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)
... 42 more
Caused by: org.alfresco.service.cmr.thumbnail.ThumbnailException: 06110023 06110022 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/5a5c6197-3be5-4083-924c-20756ac06ef9
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:788)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.access$4(ThumbnailServiceImpl.java:772)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1$1.doWork(ThumbnailServiceImpl.java:427)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1$1.doWork(ThumbnailServiceImpl.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:623)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.execute(ThumbnailServiceImpl.java:423)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.execute(ThumbnailServiceImpl.java:1)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:417)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:373)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:41)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:86)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy146.createThumbnail(Unknown Source)
at org.alfresco.repo.jscript.ScriptNode.createThumbnail(ScriptNode.java:3100)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_8._c_main_1(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js:74)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_8.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_8._c_script_0(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js:115)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_8.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3508)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_8.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_8.exec(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207)
... 47 more
Caused by: org.alfresco.service.cmr.rendition.RenditionServiceException: 06110022 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/5a5c6197-3be5-4083-924c-20756ac06ef9
at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.createOrUpdateRendition(AbstractRenderingEngine.java:1015)
at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.switchToFinalRenditionNode(AbstractRenderingEngine.java:904)
at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:481)
at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:623)
at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:451)
at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:394)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:273)
at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:856)
at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:757)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:581)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:41)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy53.executeAction(Unknown Source)
at org.alfresco.repo.rendition.RenditionServiceImpl.executeRenditionAction(RenditionServiceImpl.java:414)
at org.alfresco.repo.rendition.RenditionServiceImpl.render(RenditionServiceImpl.java:276)
at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:782)
... 94 more

Currently this error occcurs on a simple and very small txt files where serval versions are existing. Image Magick is installed and the pathes in the alfresco-global.properties are correct:

#
# PDF renderer
#
alfresco-pdf-renderer.root=C:\alfresco-nettania/alfresco-pdf-renderer

#
# Windows specific environment variables (should not be set on unix) for ImageMagick
#
img.root=C:\\ImageMagick-7.0.8-Q16
img.coders=${img.root}\\modules\\coders
img.config=${img.root}
img.exe=${img.root}\\convert.exe

Can someone help me to point this error out?

Florian

5 REPLIES 5

heiko_robert
Star Collaborator
Star Collaborator

Florian,

it is long time ago I run alfresco on win but shouldn't you use single forward or double backslashes ?

alfresco-pdf-renderer.root=C:\\alfresco-nettania\\alfresco-pdf-renderer

img.root=C:\\ImageMagick-7.0‍‍‍.8-Q16‍‍‍‍‍‍‍‍‍

Hi, thank you for your reply! The path seems to be right (took it from the configuration of Alfresco 5 created by the windows installer), this behaviour only happens with certain files, other txt files are displayed fine. Today I also mentioned that with one excel file the same behaviour and error occurs. It seems, that there is soemthing wrong with certain created preview. Is the a possibility to force a new creation of a preview?

Thanks,

Florian

Are you getting error for all PDF files or just few ? 

To answer your question, you can force thumbnail generation using two approaches.

1- Implement a behavior and implement ContentServicePolicies.OnContentUpdatePolicy. You can add a flag in global property file if you want to decide whether thumbnails should be forced async or sync and then on content update use thumbnail service to force the generation. See sample below:

// Have the thumbnail created
if (!async) {
try {
// Create the thumbnail
thumbnailService.createThumbnail(nodeRef, ContentModel.PROP_CONTENT, thumbnailDefinition.getMimetype(),
thumbnailDefinition.getTransformationOptions(), thumbnailDefinition.getName());
} catch (AlfrescoRuntimeException excp) {
if (excp.getRootCause() instanceof UnimportantTransformException){
LOGGER.error("Unable to create thumbnail {} due to {}", thumbnailDefinition.getName(), excp.getRootCause().getMessage());
}
}
} else {
final Action action = ThumbnailHelper.createCreateThumbnailAction(thumbnailDefinition, serviceRegistry);
// Queue async creation of thumbnail
actionService.executeAction(action, nodeRef, true, async);
}

2- Implement an action on share side for the content types you want to force. Create an evaluator to figure out whether thumbnail generation failed or not , if failed then enable the action and trigger the action to re-try/generate the thumbnails. 

<bean id="evaluator.doclib.action.isValidFailedThumb" class="com.github.xyz.evaluator.IsFailedThumb"/>

//File where thumbnail generation fails, alfresco will apply 'cm:failedThumbnailSource' aspect on those nodes.

import org.alfresco.web.evaluator.BaseEvaluator;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class IsFailedThumb extends BaseEvaluator {

private static final Logger LOGGER = LoggerFactory.getLogger(IsFailedThumb.class);

@Override
public boolean evaluate(final JSONObject jsonObject) {
final JSONObject nodeJson = (JSONObject) jsonObject.get("node");
final JSONArray aspectsArray = (JSONArray) nodeJson.get("aspects");
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Looking for aspect: cm:failedThumbnailSource");
}
return aspectsArray.contains("cm:failedThumbnailSource");
}
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

<action id="generateThumb" type="javascript" label="action.generate.thumb" icon="generate-thumb">
   <param name="function">onGenerateThumbAction</param>
   <evaluator>evaluator.doclib.action.isValidFailedThumb</evaluator>
</action>

if (typeof thumb == undefined || !thumb) { var thumb = {}; }
if (!thumb.doc) { thumb.doc = {}; }
(function() {
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event;
var $html = Alfresco.util.encodeHTML,
$combine = Alfresco.util.combinePaths,
$siteURL = Alfresco.util.siteURL,
$isValueSet = Alfresco.util.isValueSet;
YAHOO.Bubbling.fire("registerAction", {
actionName: "onGenerateThumbAction",
fn: function thumb_onGenerateThumbAction(record) {
nodes=[];
var scope = this,
nodeRef = record.nodeRef,
jsNode = record.jsNode;
var generateThumbURL = Alfresco.constants.PROXY_URI+"/api/node/"+nodeRef.replace(":/","")+"/content/thumbnails?as=false";
var thumbnailObj = {
"thumbnailName":"doclib"
};
Alfresco.util.PopupManager.displayMessage({
text : Alfresco.util.message("Please wait.."),
spanClass : "wait",
displayTime : 0
});
Alfresco.util.Ajax.request(
{
url: generateThumbURL,
method: Alfresco.util.Ajax.POST,
requestContentType:Alfresco.util.Ajax.JSON,
responseContentType: Alfresco.util.Ajax.JSON,
dataObj:thumbnailObj,
successCallback:
{
fn: function(){
//remove cm:failedThumbnailSource aspect after generating thumbnail
var added = [];
var removed = [];
removed.push("cm:failedThumbnailSource");
var aspectsJson = {
"added":added,
"removed":removed
}
var aspectsRemoveURL = Alfresco.constants.PROXY_URI+"slingshot/doclib/action/aspects/node/"+nodeRef.replace(":/","")
Alfresco.util.Ajax.request(
{
url: aspectsRemoveURL,
method: Alfresco.util.Ajax.POST,
requestContentType:Alfresco.util.Ajax.JSON,
responseContentType: Alfresco.util.Ajax.JSON,
dataObj:aspectsJson,
successCallback:
{
fn: function(){

YAHOO.Bubbling.fire("metadataRefresh");
Alfresco.util.PopupManager.displayMessage({
text : Alfresco.util.message("Thumbnail generated Successfully..")
});
},
scope: this
},
execScripts: true,
failureMessage: Alfresco.util.message("Failed to generate thumbnail!")
})

},
scope: this
},
execScripts: true,
failureMessage: Alfresco.util.message("Failed to generate thumbnail!")
})
}
});
})();
~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Thank you for your help. I will try these two approaches. The error only occurs on certain files, most files are displayed fine, which means, libre office to convert, is configured properly.

Florian

nettania
Confirmed Champ
Confirmed Champ

The problem of the thumbnail generation occurs occasionaly esspecially on simple txt files and xls files. Sometimes I change a txt file in alfresco share but the preview still displays the old version. Currently I have a txt file where the following error is thrown. I already downloaded the file and uploaded it as new version.

2019-08-23 16:38:25,927 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-29] Exception from executeScript: 07230013 Wrapped Exception (with status template): 07233083 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07233082 07233081 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/683f95bf-17a4-48e8-99bd-cfd3fddeaca6
org.springframework.extensions.webscripts.WebScriptException: 07230013 Wrapped Exception (with status template): 07233083 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07233082 07233081 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/683f95bf-17a4-48e8-99bd-cfd3fddeaca6
    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:512)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
    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:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    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:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
    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: 07233083 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07233082 07233081 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/683f95bf-17a4-48e8-99bd-cfd3fddeaca6
    at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:211)
    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)
    ... 42 more
Caused by: org.alfresco.service.cmr.thumbnail.ThumbnailException: 07233082 07233081 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/683f95bf-17a4-48e8-99bd-cfd3fddeaca6
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:788)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.access$4(ThumbnailServiceImpl.java:772)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1$1.doWork(ThumbnailServiceImpl.java:427)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1$1.doWork(ThumbnailServiceImpl.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:623)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.execute(ThumbnailServiceImpl.java:423)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.execute(ThumbnailServiceImpl.java:1)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:417)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:373)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:41)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:86)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
    at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:76)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
    at com.sun.proxy.$Proxy146.createThumbnail(Unknown Source)
    at org.alfresco.repo.jscript.ScriptNode.createThumbnail(ScriptNode.java:3100)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
    at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
    at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_15._c_main_1(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js:74)
    at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_15.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
    at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_15._c_script_0(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js:115)
    at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_15.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3508)
    at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_15.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
    at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_thumbnail_thumbnail_get_js_15.exec(classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207)
    ... 47 more
Caused by: org.alfresco.service.cmr.rendition.RenditionServiceException: 07233081 A rendition of name: {http://www.alfresco.org/model/content/1.0}pdf should have been created for source node: workspace://SpacesStore/683f95bf-17a4-48e8-99bd-cfd3fddeaca6
    at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.createOrUpdateRendition(AbstractRenderingEngine.java:1015)
    at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.switchToFinalRenditionNode(AbstractRenderingEngine.java:904)
    at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:481)
    at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:1)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:623)
    at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:451)
    at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:394)
    at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:273)
    at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:856)
    at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:757)
    at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:581)
    at jdk.internal.reflect.GeneratedMethodAccessor1182.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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:41)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
    at com.sun.proxy.$Proxy53.executeAction(Unknown Source)
    at org.alfresco.repo.rendition.RenditionServiceImpl.executeRenditionAction(RenditionServiceImpl.java:414)
    at org.alfresco.repo.rendition.RenditionServiceImpl.render(RenditionServiceImpl.java:276)
    at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:782)
    ... 94 more

I hope someone can give me a hint to solve this problem.

Florian