AnsweredAssumed Answered

Problems with .msg files from Outlook 2003

Question asked by savah on Jan 22, 2008
Latest reply on Feb 4, 2008 by kevinr
Greetings all,

It seems we are facing some problems with the way Alfresco is handling emails of .msg type saved with Outlook 2003. The email is uploaded fine but if we try to hit the preview button in order to show the email on the preview window Alfresco crashes with the exception shown below. Also searching for terms that exist in the email's body does not work. The email is written in Greek and we have tried setting the encoding both in UTF-8 and ISO 8859-7 (greek). Content type is always Email and this is automatically filled by Alfresco. From Outlook's perspective we have tried to save the email both in .msg format and unicode .msg format without any success.

For a strange reason if the email is saved with Outlook 2000 and concequently uploaded in Alfresco it works fine without throwing any exceptions.

Tomcat console when exception is throwed is shown below.

16:26:33,968 ERROR [alfresco.ajax] Failed to execute method NodeInfoBean.sendNodeInfo: Unknown Exception in Transaction.
org.alfresco.error.AlfrescoRuntimeException: Unknown Exception in Transaction.
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:292)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.web.app.servlet.ajax.InvokeCommand.execute(InvokeCommand.java:167)
   at org.alfresco.web.app.servlet.ajax.AjaxServlet.service(AjaxServlet.java:148)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.InvocationTargetException
   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.web.app.servlet.ajax.InvokeCommand$1.execute(InvokeCommand.java:163)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   … 18 more
Caused by: org.alfresco.service.cmr.repository.TemplateException: Error during processing of the template 'Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2008/1/22/16/24/cc1c9505-c8f5-11dc-bcd0-d1fa6a7067aa.bin, mimetype=message/rfc822, size=39936, encoding=UTF-8, locale=el_GR]
   writer: ContentAccessor[ contentUrl=store://2008/1/22/16/26/0835b63e-c8f6-11dc-bcd0-d1fa6a7067aa.bin, mimetype=text/plain, size=3525, encoding=UTF-8, locale=el_GR]
   options: {}'. Please contact your system administrator.
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:204)
   at org.alfresco.repo.processor.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:177)
   at org.alfresco.repo.processor.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:107)
   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: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.auditImpl(AuditComponentImpl.java:256)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
   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 $Proxy94.processTemplate(Unknown Source)
   at org.alfresco.web.bean.ajax.NodeInfoBean.sendNodeInfo(NodeInfoBean.java:92)
   … 24 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2008/1/22/16/24/cc1c9505-c8f5-11dc-bcd0-d1fa6a7067aa.bin, mimetype=message/rfc822, size=39936, encoding=UTF-8, locale=el_GR]
   writer: ContentAccessor[ contentUrl=store://2008/1/22/16/26/0835b63e-c8f6-11dc-bcd0-d1fa6a7067aa.bin, mimetype=text/plain, size=3525, encoding=UTF-8, locale=el_GR]
   options: {}
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:255)
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:210)
   at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:468)
   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:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:129)
   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 $Proxy24.transform(Unknown Source)
   at org.alfresco.repo.template.BaseContentNode$TemplateContentData.getContentAsText(BaseContentNode.java:478)
   at org.alfresco.repo.template.CropContentMethod.exec(CropContentMethod.java:64)
   at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
   at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
   at freemarker.core.Assignment.accept(Assignment.java:90)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.Environment.process(Environment.java:176)
   at freemarker.template.Template.process(Template.java:232)
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:200)
   … 46 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: Property set stream: \__nameid_version1.0__substg1.0_10000102
   at org.alfresco.repo.content.transform.MailContentTransformer$1.processPOIFSReaderEvent(MailContentTransformer.java:96)
   at org.apache.poi.poifs.eventfilesystem.POIFSReader.processProperties(POIFSReader.java:259)
   at org.apache.poi.poifs.eventfilesystem.POIFSReader.processProperties(POIFSReader.java:228)
   at org.apache.poi.poifs.eventfilesystem.POIFSReader.read(POIFSReader.java:95)
   at org.alfresco.repo.content.transform.MailContentTransformer.transformInternal(MailContentTransformer.java:110)
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:246)
   … 83 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: Failed to open stream onto channel:
   writer: ContentAccessor[ contentUrl=store://2008/1/22/16/26/0835b63e-c8f6-11dc-bcd0-d1fa6a7067aa.bin, mimetype=text/plain, size=3525, encoding=UTF-8, locale=el_GR]
   at org.alfresco.repo.content.AbstractContentWriter.getContentOutputStream(AbstractContentWriter.java:390)
   at org.alfresco.repo.content.AbstractContentWriter.putContent(AbstractContentWriter.java:465)
   at org.alfresco.repo.content.transform.MailContentTransformer$1.processPOIFSReaderEvent(MailContentTransformer.java:90)
   … 88 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: A channel has already been opened
   at org.alfresco.repo.content.AbstractContentWriter.getWritableChannel(AbstractContentWriter.java:239)
   at org.alfresco.repo.content.AbstractContentWriter.getContentOutputStream(AbstractContentWriter.java:383)
   … 90 more

Outcomes