AnsweredAssumed Answered

Webdav + Action => bug

Question asked by egabbud on Aug 4, 2006
Latest reply on Apr 11, 2008 by ruffp
Hello!

I have configured an action with a custom transformer on an Alfresco Space. When uploading content through the Wizard or through FTP, the transformation is done properly.
But not when uploading the document through Webdav. I get ugly errors (see below).
I've mounted the Webdav folder from Linux (Ubuntu and Suse). It looks like that the action begins before the content is uploaded. The reader is  effectively of size 0.
Using Alfresco 1.3.

Any idea?
Thanks.
Emmanuel

ERROR [repo.action.ActionServiceImpl] An error was encountered whilst executing the action 'composite-action'.
org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2006/8/3/9t/39/220d5dd2-22c3-11db-bd66-9b6189e6e465.bin, mimetype=application/msword, size=0, encoding=UTF-8]
   writer: ContentAccessor[ contentUrl=store://2006/8/3/9/39/231de37f-22c3-11db-bd66-9b6189e6e465.bin, mimetype=text/xml, size=0, encoding=UTF-8]
   options: {}
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:250)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:206)
        at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:372)
        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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy16.transform(Unknown Source)
        at org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExecuter.java:271)
        at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:250)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:64)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:456)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:280)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
        at org.alfresco.repo.transaction.TransactionUtil.executeInNonPropagatingUserTransaction(TransactionUtil.java:108)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:275)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes
        at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:78)
        at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:83)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:102)
        at com.mycompany.transform.MyContentTransformer.transformInternal(MyContentTransformer.java:71)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:241)
        … 34 more
org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2006/8/3/9/39/220d5dd2-22c3-11db-bd66-9b6189e6e465.bin, mimetype=application/msword, size=0, encoding=UTF-8]
   writer: ContentAccessor[ contentUrl=store://2006/8/3/9/39/231de37f-22c3-11db-bd66-9b6189e6e465.bin, mimetype=text/xml, size=0, encoding=UTF-8]
   options: {}
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:250)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:206)
        at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:372)
        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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy16.transform(Unknown Source)
        at org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExecuter.java:271)
        at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:250)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:64)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:456)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:280)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
        at org.alfresco.repo.transaction.TransactionUtil.executeInNonPropagatingUserTransaction(TransactionUtil.java:108)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:275)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes
        at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:78)
        at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:83)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:102)
        at com.mycompany.transform.MyContentTransformer.transformInternal(MyContentTransformer.java:71)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:241)
        … 34 more
09:39:06,641 ERROR [repo.action.ActionServiceImpl] An error was encountered whilst executing the action 'composite-action'.
org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2006/8/3/9/39/23804ee6-22c3-11db-bd66-9b6189e6e465.bin, mimetype=application/msword, size=0, encoding=UTF-8]
   writer: ContentAccessor[ contentUrl=store://2006/8/3/9/39/248080f6-22c3-11db-bd66-9b6189e6e465.bin, mimetype=text/xml, size=0, encoding=UTF-8]
   options: {}
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:250)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:206)
        at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:372)
        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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy16.transform(Unknown Source)
        at org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExecuter.java:271)
        at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:250)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:64)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:456)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:280)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
        at org.alfresco.repo.transaction.TransactionUtil.executeInNonPropagatingUserTransaction(TransactionUtil.java:108)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:275)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes
        at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:78)
        at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:83)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:102)
        at com.mycompany.transform.MyContentTransformer.transformInternal(MyContentTransformer.java:71)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:241)
        … 34 more
org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2006/8/3/9/39/23804ee6-22c3-11db-bd66-9b6189e6e465.bin, mimetype=application/msword, size=0, encoding=UTF-8]
   writer: ContentAccessor[ contentUrl=store://2006/8/3/9/39/248080f6-22c3-11db-bd66-9b6189e6e465.bin, mimetype=text/xml, size=0, encoding=UTF-8]
   options: {}
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:250)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:206)
        at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:372)
        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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy16.transform(Unknown Source)
        at org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExecuter.java:271)
        at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:250)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:64)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:112)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:524)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:456)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:280)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
        at org.alfresco.repo.transaction.TransactionUtil.executeInNonPropagatingUserTransaction(TransactionUtil.java:108)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:275)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes
        at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:78)
        at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:83)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:102)
        at com.mycompany.transform.MyContentTransformer.transformInternal(MyContentTransformer.java:71)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:241)
        … 34 more

Outcomes