cancel
Showing results for 
Search instead for 
Did you mean: 

FIXED Error Opening Word Docs in CIFS under Record Managment

rvdlinde
Champ in-the-making
Champ in-the-making
When opening MS Word Docs in File Plan folder in CIFS, I get a pop-up error "There is an unrecoverable disk error on file…" in Word  (using 2003).  The log file shows a Metadata Extraction on onContentUpdate_rmaRecord.js.  Interestingly, I do not have issues with.ppt, xls or .pdf files.

I saw this issue in 3.0 Final and in 2.1.  The log file below is from 2.1.


14:02:59,132 ERROR [org.alfresco.smb.protocol] Closing session due to exception
org.alfresco.service.cmr.repository.ScriptException: Failed to execute script 'alfresco/module/org.alfresco.module.RecordsManagement/script/onContentUpdate_rmaRecord.js': Failed to execute script 'alfresco/m
odule/org.alfresco.module.RecordsManagement/script/onContentUpdate_rmaRecord.js': Wrapped org.alfresco.service.cmr.repository.ContentIOException: Metadata extraction failed:
   reader: ContentAccessor[ contentUrl=store://2009/6/11/14/2/3de4fbc2-56cb-11de-b2c5-957830c2b4e9.bin, mimetype=application/msword, size=162, encoding=UTF-8, locale=en_US] (AlfrescoScript#40)
        at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:222)
        at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:238)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy48.executeScript(Unknown Source)
        at org.alfresco.repo.jscript.ScriptBehaviour$JavaScriptInvocationHandler.invokeScript(ScriptBehaviour.java:167)
        at org.alfresco.repo.jscript.ScriptBehaviour$JavaScriptInvocationHandler.invoke(ScriptBehaviour.java:150)
        at $Proxy36.onContentUpdate(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.alfresco.repo.policy.PolicyFactory$MultiHandler.invoke(PolicyFactory.java:251)
        at org.alfresco.repo.policy.$Proxy88.onContentUpdate(Unknown Source)
        at org.alfresco.repo.content.RoutingContentService.onUpdateProperties(RoutingContentService.java:269)
        at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:179)
        at $Proxy4.onUpdateProperties(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.alfresco.repo.policy.PolicyFactory$MultiHandler.invoke(PolicyFactory.java:251)
        at org.alfresco.repo.policy.$Proxy79.onUpdateProperties(Unknown Source)
        at org.alfresco.repo.node.AbstractNodeServiceImpl.invokeOnUpdateProperties(AbstractNodeServiceImpl.java:341)
        at org.alfresco.repo.node.db.DbNodeServiceImpl.setProperty(DbNodeServiceImpl.java:1063)
        at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:138)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy2.setProperty(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
        at $Proxy3.setProperty(Unknown Source)
        at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:206)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)

Any help would be greatly appreciated.

UPDATE - I noticed that the issue comes from the temp file MS word creates in the folder(~$lename.doc).  The other formats do not create temp files.
I put these two lines into the onContentUpdat script:

var tilde = String(title).substring(0,1);

if (record.hasAspect(rm.ASPECT_RECORD) == true && isNewContent == true && tilde != "~")


It now opens without creating a temp file.

Rich
1 REPLY 1

nancyg
Champ in-the-making
Champ in-the-making
Rich, glad you were able to resolve the problem and thanks for posting the solution.

Nancy