Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-24273

When an email has an attachment, a stracktrace is thrown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.8.1
    • Fix Version/s: 2.9.0
    • Component/s: Mailsender
    • Labels:
      None
    • 2.9 Status:
      Resolved
    • Previous Issue Keys:
      MSND-60

      Description

      When an email has an attachment and you click send, the following strict trace is thrown in the logs:

      2012-01-18 15:33:08,352 WARN ajp-8009-11 PonderUtilCore - Error invoking action
      Target exception of class java.lang.ClassCastException
      Successive lines until stack trace show causes progressing to exception site:
      Error invoking action
      --> Error invoking method sendEmail in bean at path emailBean.sendEmail
      --> org.springframework.web.multipart.commons.CommonsMultipartFile cannot be cast to org.springframework.web.multipart.MultipartFile
      java.lang.ClassCastException: org.springframework.web.multipart.commons.CommonsMultipartFile cannot be cast to org.springframework.web.multipart.MultipartFile
      at org.sakaiproject.mailsender.logic.impl.ExternalLogicImpl.sendEmail(ExternalLogicImpl.java:394)
      at org.sakaiproject.mailsender.tool.beans.EmailBean.sendEmail(EmailBean.java:200)
      at sun.reflect.GeneratedMethodAccessor11822.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at uk.org.ponder.reflect.JDKReflectiveCache.invokeMethod(JDKReflectiveCache.java:23)
      at uk.org.ponder.reflect.JDKReflectiveCache.invokeMethod(JDKReflectiveCache.java:17)
      at uk.org.ponder.reflect.JDKReflectiveCache.invokeMethod(JDKReflectiveCache.java:77)
      at uk.org.ponder.reflect.ReflectiveCache.invokeMethod(ReflectiveCache.java:141)
      at uk.org.ponder.mapping.support.DARApplier.invokeBeanMethod(DARApplier.java:179)
      at uk.org.ponder.rsf.state.support.RSVCApplier.invokeAction(RSVCApplier.java:218)
      at uk.org.ponder.rsf.processor.support.RSFActionHandler$1.run(RSFActionHandler.java:189)
      at uk.org.ponder.util.CollectingRunnableInvoker$1.run(CollectingRunnableInvoker.java:25)
      at uk.org.ponder.rsf.flow.support.BasicScopedAlterationWrapper.invokeRunnable(BasicScopedAlterationWrapper.java:59)
      at uk.org.ponder.rsf.flow.support.BasicScopedAlterationWrapper$$FastClassByCGLIB$$84f89202.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
      at uk.org.ponder.rsf.flow.support.BasicScopedAlterationWrapper$$EnhancerByCGLIB$$715b903c.invokeRunnable(<generated>)
      at uk.org.ponder.rsf.flow.support.BasicScopedAlterationWrapper$$FastClassByCGLIB$$84f89202.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
      at uk.org.ponder.rsf.flow.support.BasicScopedAlterationWrapper$$EnhancerByCGLIB$$715b903c.invokeRunnable(<generated>)
      at uk.org.ponder.util.CollectingRunnableInvoker$1.run(CollectingRunnableInvoker.java:29)
      at uk.org.ponder.util.CollectingRunnableInvoker.invokeWrappers(CollectingRunnableInvoker.java:22)
      at uk.org.ponder.util.CollectingRunnableInvoker.invokeRunnable(CollectingRunnableInvoker.java:14)
      at uk.org.ponder.rsf.processor.support.RSFActionHandler.handle(RSFActionHandler.java:165)
      at uk.org.ponder.rsf.processor.support.RSFActionHandler$$FastClassByCGLIB$$e3b6899d.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
      at uk.org.ponder.rsf.processor.support.RSFActionHandler$$EnhancerByCGLIB$$8547b17.handle(<generated>)
      at uk.org.ponder.rsf.processor.support.RootHandlerBeanBase.handlePost(RootHandlerBeanBase.java:125)
      at uk.org.ponder.rsf.processor.support.RootHandlerBeanBase.handle(RootHandlerBeanBase.java:82)
      at sun.reflect.GeneratedMethodAccessor4006.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at uk.org.ponder.reflect.JDKReflectiveCache.invokeMethod(JDKReflectiveCache.java:23)
      at uk.org.ponder.reflect.JDKReflectiveCache.invokeMethod(JDKReflectiveCache.java:17)
      at uk.org.ponder.reflect.JDKReflectiveCache.invokeMethod(JDKReflectiveCache.java:77)
      at uk.org.ponder.rsac.support.RSACBeanLocatorImpl.createBean(RSACBeanLocatorImpl.java:553)
      at uk.org.ponder.rsac.support.RSACBeanLocatorImpl.access$000(RSACBeanLocatorImpl.java:75)
      at uk.org.ponder.rsac.support.RSACBeanLocatorImpl$1.run(RSACBeanLocatorImpl.java:449)
      at uk.org.ponder.rsac.RSACErrorBridge.invokeRunnable(RSACErrorBridge.java:38)
      at uk.org.ponder.rsac.support.RSACBeanLocatorImpl.createBean(RSACBeanLocatorImpl.java:447)
      at uk.org.ponder.rsac.support.RSACBeanLocatorImpl.getLocalBean(RSACBeanLocatorImpl.java:348)
      at uk.org.ponder.rsac.support.RSACBeanLocatorImpl.getBean(RSACBeanLocatorImpl.java:379)
      at uk.org.ponder.rsac.support.PerRequestInfo$1.locateBean(PerRequestInfo.java:49)
      at uk.ac.cam.caret.sakai.rsf.servlet.ReasonableSakaiServlet.service(ReasonableSakaiServlet.java:65)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:598)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:511)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1442)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:204)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:96)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doPost(ToolHandler.java:73)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:1237)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:659)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      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:174)
      at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:446)
      at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1303)
      at java.lang.Thread.run(Thread.java:662)

      The UI gets the message:
      A problem occurred while processing the request.

      And clicking send again sends the email but without the attachment.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                thecarlhall Carl Hall (Inactive)
                Reporter:
                steve.swinsburg Steve Swinsburg
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration