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

NPE when creating email notification with assignment attachments

    XMLWordPrintable

    Details

    • 19 status:
      Verified
    • 12 status:
      Verified
    • Test Plan:
      Hide

      In order for the stack to appear:

      • Assignment option:
        • Released Grade Notification Email Options:Send notification email to student when the grade is released
      • Add a feedback Attachment to the submission
      • And then "Save and Release to Student" to send the email 
      Show
      In order for the stack to appear: Assignment option: Released Grade Notification Email Options:Send notification email to student when the grade is released Add a feedback Attachment to the submission And then "Save and Release to Student" to send the email 

      Description

      The following stack trace can be seen when a notification is sent where the attachment is NULL. 

       

      WARN [http-apr-8476-exec-914] org.sakaiproject.cheftool.VelocityPortletPaneledAction.actionDispatch Exception calling method doAssignment_form java.lang.reflect.InvocationTargetException (Caused by java.lang.NullPointerException)
      java.lang.reflect.InvocationTargetException
              at sun.reflect.GeneratedMethodAccessor5092.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.sakaiproject.cheftool.VelocityPortletPaneledAction.actionDispatch(VelocityPortletPaneledAction.java:740)
              at org.sakaiproject.cheftool.VelocityPortletPaneledAction.processAction(VelocityPortletPaneledAction.java:552)
              at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:228)
              at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1152)
              at org.sakaiproject.cheftool.ToolServlet.doPost(ToolServlet.java:152)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
              at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:426)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
              at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
              at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1489)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doToolBuffer(SiteHandler.java:1228)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent(SiteHandler.java:1062)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:491)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:267)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:155)
              at org.sakaiproject.portal.charon.handlers.WorksiteHandler.doPost(WorksiteHandler.java:69)
              at org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:1171)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:475)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
              at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
              at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2109)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
              at org.sakaiproject.assignment.impl.EmailUtil.lambda$htmlContentAttachments$3(EmailUtil.java:309)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
              at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
              at java.util.Iterator.forEachRemaining(Iterator.java:116)
              at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
              at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
              at org.sakaiproject.assignment.impl.EmailUtil.htmlContentAttachments(EmailUtil.java:307)
              at org.sakaiproject.assignment.impl.EmailUtil.getNotificationMessage(EmailUtil.java:90)
              at org.sakaiproject.assignment.impl.AssignmentServiceImpl.sendGradeReleaseNotification(AssignmentServiceImpl.java:3823)
              at org.sakaiproject.assignment.impl.AssignmentServiceImpl.updateSubmission(AssignmentServiceImpl.java:1218)
              at sun.reflect.GeneratedMethodAccessor5085.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
              at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
              at com.sun.proxy.$Proxy209.updateSubmission(Unknown Source)
              at org.sakaiproject.assignment.tool.AssignmentAction.grade_submission_option(AssignmentAction.java:6002)
              at org.sakaiproject.assignment.tool.AssignmentAction.doReturn_grade_submission(AssignmentAction.java:5840)
              at org.sakaiproject.assignment.tool.AssignmentAction.doAssignment_form(AssignmentAction.java:10298)
              ... 56 more

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                • Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  drramsey Derek Ramsey
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Integration