HTML preview failed

cancel
Showing results for 
Search instead for 
Did you mean: 
morisbozzetto
Member II

HTML preview failed

Ciao

Ho installato la versione Community 5.2.0 (r133656-b12) su un server windows 2008.

Quando cerco di creare un nuovo documento HTML ricevo un errore durante l'anteprima del file (Could not load pdf content).

Il problema sembra non presentarsi su linux (ho provato una macchina virtuale bitnami per virtualbox che utilizza la stessa versione)

Il log dell'errore è riportato di seguito.

Qualcuno ha avuto lo stesso problema e ha trovato una soluzione

Grazie

Moris

Caused by: org.alfresco.scripts.ScriptException: 00230091 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 00230090 Content conversion failed:
reader: ContentAccessor[ contentUrl=store://2017/1/20/14/22/0df0c646-d1e7-4dce-b81a-c42b94615310.bin, mimetype=text/html, size=1490, encoding=UTF-8, locale=en_US]
writer: ContentAccessor[ contentUrl=store://2017/1/23/8/48/96a5254c-5e80-4cc7-afef-3e2610eaeca2.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=it_IT]
options: {use=pdf, contentReaderNodeRef=workspace://SpacesStore/4fd4ba1d-f01a-4e47-8a56-01e5846159ae, sourceContentProperty=null, contentWriterNodeRef=workspace://SpacesStore/1fe3cdf7-234c-4058-95ff-ea1b597b18ff, targetContentProperty=null, includeEmbedded=null}
limits: {timeoutMs=120000}
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)
... 37 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 00230090 Content conversion failed:
reader: ContentAccessor[ contentUrl=store://2017/1/20/14/22/0df0c646-d1e7-4dce-b81a-c42b94615310.bin, mimetype=text/html, size=1490, encoding=UTF-8, locale=en_US]
writer: ContentAccessor[ contentUrl=store://2017/1/23/8/48/96a5254c-5e80-4cc7-afef-3e2610eaeca2.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=it_IT]
options: {use=pdf, contentReaderNodeRef=workspace://SpacesStore/4fd4ba1d-f01a-4e47-8a56-01e5846159ae, sourceContentProperty=null, contentWriterNodeRef=workspace://SpacesStore/1fe3cdf7-234c-4058-95ff-ea1b597b18ff, targetContentProperty=null, includeEmbedded=null}
limits: {timeoutMs=120000}
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:350)
at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:613)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:136)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
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.$Proxy49.transform(Unknown Source)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable$1.doWork(AbstractTransformationRenderingEngine.java:447)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable$1.doWork(AbstractTransformationRenderingEngine.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable.call(AbstractTransformationRenderingEngine.java:437)
at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine$TransformationCallable.call(AbstractTransformationRenderingEngine.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 00230089 Content conversion failed:
reader: ContentAccessor[ contentUrl=store://C:\ALFRES~1\tomcat\temp\Alfresco\ComplextTransformer_intermediate_html_4666491742844310643.odt, mimetype=application/vnd.oasis.opendocument.text-web, size=11426, encoding=UTF-8, locale=it_IT]
writer: ContentAccessor[ contentUrl=store://2017/1/23/8/48/96a5254c-5e80-4cc7-afef-3e2610eaeca2.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=it_IT]
options: {use=pdf, contentReaderNodeRef=null, sourceContentProperty=null, contentWriterNodeRef=workspace://SpacesStore/1fe3cdf7-234c-4058-95ff-ea1b597b18ff, targetContentProperty=null, includeEmbedded=null}
limits: {timeoutMs=120000}
claimed mime type: application/vnd.oasis.opendocument.text-web
detected mime type: application/vnd.oasis.opendocument.text-web
transformer not found

16 Replies
iwkse
Established Member

Re: HTML preview failed

Ciao, controlla che libreoffice sia in esecuzione anche se non credo sia quello il problema. Non trova la trasformazione, forse è un bug dell'installer.

davidciamberlan
Alfresco Employee

Re: HTML preview failed

Ciao,

Ma per altri file riesci a visualizzare l'anteprima?

Se la risposta è no, allora vale il suggerimento di iwkse (in particolare controlla nell'alfresco-global.properties le properties che iniziano con "ooo.").

Se la risposta è sì allora probabilmente il problema è che, da quanto posso vedere, il file che stai cercando di visualizzare ha mimetype: application/vnd.oasis.opendocument.text-web che contraddistingue un "web page template" di openoffice e non un normale file hmtl.

Per questo non viene trovato il converter.

Come hai generato quel file? Prova a convertirlo in un normale html (mimetype: text/html).

morisbozzetto
Member II

Re: HTML preview failed

Tutti i file , HTML escluso, sono visualizzati correttamente.

L'html viene creato da alfresco( nuovo documento HTML). Il file viene

salvato correttamente ma l' anteprima non funziona.

Il 24 gen 2017 19:25, "davidciamberlano" <community@alfresco.com> ha

scritto:

Alfresco Community

<https://community.alfresco.com/?et=watches.email.thread>

Re: HTML preview failed

reply from David Ciamberlano

<https://community.alfresco.com/people/davidciamberlano?et=watches.email.thread>

in Italian User Group - View the full discussion

<https://community.alfresco.com/message/806754-re-html-preview-failed?commentID=806754&et=watches.email.thread#comment-806754>

morisbozzetto
Member II

Re: HTML preview failed

Ciao

ho provato anche a creare un file html con notepad e importarlo in alfresco, ma il problema si presenta comunque.

Il mimetype del documento è text/html.

Grazie

iwkse
Established Member

Re: HTML preview failed

Il mimetype nei log ora è text/html o application/vnd.oasis.opendocument.text-web?

morisbozzetto
Member II

Re: HTML preview failed

Il mimetype è sempre application/vnd.oasis.opendocument.text-web

Caused by: org.alfresco.service.cmr.repository.ContentIOException: 00250422 Content conversion failed:
reader: ContentAccessor[ contentUrl=store://C:\ALFRES~1\tomcat\temp\Alfresco\ComplextTransformer_intermediate_html_5536890378579503449.odt, mimetype=application/vnd.oasis.opendocument.text-web, size=10787, encoding=UTF-8, locale=it_IT]
writer: ContentAccessor[ contentUrl=store://2017/1/25/14/45/bef8494a-1667-4862-82e4-6d28e57db5e4.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=it_IT]
options: {use=pdf, contentReaderNodeRef=null, sourceContentProperty=null, contentWriterNodeRef=workspace://SpacesStore/43e9460f-aa5c-4a6c-aac1-0b9bd2a442e3, targetContentProperty=null, includeEmbedded=null}
limits: {timeoutMs=120000}
claimed mime type: application/vnd.oasis.opendocument.text-web
detected mime type: application/vnd.oasis.opendocument.text-web
transformer not found

iwkse
Established Member

Re: HTML preview failed

Controlla nel mimetype di windows (non ho idea dove, non uso windows) che htm e html siano associati a text/html e non application/vnd.oasis.opendocument.text-web

morisbozzetto
Member II

Re: HTML preview failed

Già verificato, è impostato correttamente.

Non è possibile impostare il tipo mime type del file in alfresco? in maniera tale da fargli prendere il mimetype corretto.

Oppure configurare in qualche modo il transformer da application/vnd.oasis.opendocument.text-web ?

Grazie

iwkse
Established Member

Re: HTML preview failed

Mi sembra una situazione anomala, come dicevo nel primo post, penso ad un bug. In mimetype-map.xml trovi le definizioni, non so esattamente in quale jar si trova però. Vedi qui per altre info Adding a MIME type | Alfresco Documentation