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

Catch NPE's and provide even more information when grade failures occur

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.4
    • Fix Version/s: 11.4, 12.0
    • Component/s: BasicLTI, edu-services
    • Labels:
      None
    • 11 status:
      Resolved

      Description

      Additional logging in SAK-32338 has revealed the source of a number of errors (in 11.x LTI)

      I'm not entirely sure where these are coming from but these are some stack trace snippets. I plan to look at these and try to catch some more of these possible errors to try to provide some better idea of why these are faliing.

      I'm not 100% sure what the null parameter here is. It would be nice if this Exception actually said what the null parameter was. The code here is

      		if (gradebookUid == null || assignmentId == null || studentUid == null) {
      

      So that should be more specific.

      21-Mar-2017 09:52:34.977 WARN [http-apr-8543-exec-98] org.sakaiproject.basiclti.util.SakaiBLTIUtil.handleGradebook handleGradebook Grade failure in site:fa2b3761-42b9-45bb-8668-048e4507cc65
      java.lang.IllegalArgumentException: null parameter passed to getAssignmentScoreString
              at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.getAssignmentScoreString(GradebookServiceHibernateImpl.java:2382)
              at sun.reflect.GeneratedMethodAccessor9347.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:302)
              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:281)
              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:208)
              at com.sun.proxy.$Proxy113.getAssignmentScoreString(Unknown Source)
              at org.sakaiproject.basiclti.util.SakaiBLTIUtil.handleGradebook(SakaiBLTIUtil.java:1710)
      

      This one is on this line

      				retMap.put("comment",commentDef.getCommentText());
      

      and would see like like commentDef is null.

      21-Mar-2017 09:53:05.185 WARN [http-apr-8543-exec-175] org.sakaiproject.basiclti.util.SakaiBLTIUtil.handleGradebook handleGradebook Grade failure in site:fa2b3761-42b9-45bb-8668-048e4507cc65
      java.lang.NullPointerException
              at org.sakaiproject.basiclti.util.SakaiBLTIUtil.handleGradebook(SakaiBLTIUtil.java:1720)
              at org.sakaiproject.basiclti.util.SakaiBLTIUtil.getGrade(SakaiBLTIUtil.java:1538)
              at org.sakaiproject.blti.ServiceServlet.processOutcomeXml(ServiceServlet.java:963)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  jonespm Matthew Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code